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

Missing fields in response when Buzz follows 301 redirect #82

Open
Kanabanarama opened this issue Sep 13, 2017 · 0 comments
Open

Missing fields in response when Buzz follows 301 redirect #82

Kanabanarama opened this issue Sep 13, 2017 · 0 comments

Comments

@Kanabanarama
Copy link

I came across the problem that the fields are missing in a search response when using a http url of a host that redirects to https. In this case the documents in the answer look normal like this:

"documents":[{"pos":0,"score":1.0,"collapseCount":0},{"pos" [...]

but the "fields" attribute is missing.

This is due to Buzz following the redirect because of CURLOPT_FOLLOWLOCATION, but the request body is missing in the subsequent requests. CURLOPT_FOLLOWLOCATION switches from POST to GET requests, so the POST body is lost due to the default CURLOPT_POSTREDIR setting.

I made a PR in the Buzz repo that addresses this issue.

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