Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Test Suite does not register successful responses from www-api.staging.jvt.me #86

Open
jamietanna opened this issue Dec 26, 2019 · 5 comments

Comments

@jamietanna
Copy link
Contributor

Micropub.rocks seems to not register a response when using my staging Micropub endpoint:

curl -i https://www-api.staging.jvt.me/micropub -d 'h=entry&content=Micropub+test+of+creating+an+h-entry+with+categories.+This+post+should+have+two+categories,+test1+and+test2&category[]=test1&category[]=test2' -H 'Authorization: Bearer ...'

HTTP/2 202
cache-control: no-cache, no-store, max-age=0, must-revalidate
date: Thu, 26 Dec 2019 15:53:51 GMT
expires: 0
location: https://www.staging.jvt.me/post#eyJraW5kIjoibm90ZXMiLCJzbHVnIjpudWxsLCJjbGllbnRfaWQiOiJodHRwczovL21pY3JvcHViLnJvY2tzLyIsImRhdGUiOiIyMDE5LTEyLTI2VDE2OjUzOjUxLjE0NiswMTowMCIsImgiOiJoLWVudHJ5IiwicHJvcGVydGllcyI6eyJwdWJsaXNoZWQiOlsiMjAxOS0xMi0yNlQxNjo1Mzo1MS4xNDYrMDE6MDAiXSwiY2F0ZWdvcnkiOlsidGVzdDIiLCJ0ZXN0MSJdLCJjb250ZW50IjpbeyJodG1sIjoiIiwidmFsdWUiOiJNaWNyb3B1YiB0ZXN0IG9mIGNyZWF0aW5nIGFuIGgtZW50cnkgd2l0aCBjYXRlZ29yaWVzLiBUaGlzIHBvc3Qgc2hvdWxkIGhhdmUgdHdvIGNhdGVnb3JpZXMsIHRlc3QxIGFuZCB0ZXN0MiJ9XSwic3luZGljYXRpb24iOlsiaHR0cHM6Ly9icmlkLmd5L3B1Ymxpc2gvdHdpdHRlciJdfSwidGFncyI6WyJ0ZXN0MiIsInRlc3QxIl19
pragma: no-cache
server: Caddy
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 1; mode=block
content-length: 0

Could this be related to the Location header returning a URL fragment not a querystring?

@jamietanna jamietanna changed the title [Bug} Test Suite does not register successful responses from www-api.staging.jvt.me [Bug] Test Suite does not register successful responses from www-api.staging.jvt.me Dec 26, 2019
@jamietanna
Copy link
Contributor Author

jamietanna commented Dec 26, 2019

Looking in the Network tab of the browser, I see a 500 response from https://micropub.rocks/server-tests/micropub when hitting Run, which sends POST body:

test=34&endpoint=430&skipauth=0&method=post&body=h%3Dentry%26content%3DMicropub%2Btest%2Bof%2Bcreating%2Ban%2Bh-entry%2Bwith%2Bone%2Bcategory.%2BThis%2Bpost%2Bshould%2Bhave%2Bone%2Bcategory%2C%2Btest1%26category%3Dtest1

@jamietanna
Copy link
Contributor Author

it's possible it's due to Caddy returning as HTTP/2 which returns the Location header as lowercase (because it's case-insensitive in HTTP/2)

@jamietanna
Copy link
Contributor Author

Correction: it's valid to be case insensitive as per HTTP/1.1, but in HTTP/2 it always sends as lowercase https://superuser.com/a/1467474

@jamietanna
Copy link
Contributor Author

Not 100% sure if it's related to the GuzzleHTTP client as I've run it locally against an HTTP/2 endpoint and case-sensitivity doesn't seem to be an issue.

@aaronpk is it possible to see if there's anything in the logs?

@jamietanna
Copy link
Contributor Author

Disabling HTTP/2 on Caddy still results in a 500 from Micropub.rocks, so I believe it's an issue unrelated to HTTP version / header case sensitivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant