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

BE_HTTP_ResponseHeaders returns multiple values when doing 301 redirects #225

Open
nickorr opened this issue Aug 2, 2024 · 0 comments
Open

Comments

@nickorr
Copy link
Member

nickorr commented Aug 2, 2024

Describe the bug

When you're doing a HTTP GET and the url has a 301 redirect AND you've set CURLOPT_FOLLOWLOCATION on, then afterwards when you get individual headers, you can get multiple values in response.

To Reproduce

BE_CurlSetOption ( "CURLOPT_FOLLOWLOCATION" ; True )
BE_HTTP_GET ( "https://static1.squarespace.com/static/5ead103e48edc3660e493426/5ee5bbf876031e0b0e55b842/66ac41049c6bb940a1199941/1716119884025/PhotoRoom-20230530_221048_16.png" ; "PhotoRoom-20230530_221048_16.png" )

Then BE_HTTP_ResponseHeaders ( "Content-Type" ) returns :

image/png
content-type: image/png

and BE_HTTP_ResponseHeaders ( "content-type" ) returns :

Content-Type: image/png
image/png

Expected behavior

It should be only the last value in the headers, so in this example the lower case one from the 200, and should be able to ignore case, so BE_HTTP_ResponseHeaders ( "Content-Type" ) would also work fine.

Desktop (please complete the following information):

BE : 05000002

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