Skip to content

Missing fields in response when Buzz follows 301 redirect #82

Open
@Kanabanarama

Description

@Kanabanarama

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions