Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Problem with redirect headers management and CURLOPT_HEADER #1

@shulard

Description

@shulard

We use the CURLOPT_HEADER option to retrieve headers returned by the server.

When the URL retrieved was redirected by a 3XX code, the headers from the first call and the redirected page are received.

Example with the URL http://jeu.info/course.html which redirect with 301 to http://jeu.info/, these headers are given by the CURLOPT_HEADER option:

HTTP/1.1 301 moved permanently
Server: nginx
Date: Tue, 18 Mar 2014 09:15:43 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: ASP.NET
location: http://jeu.info/
Content-Length: 0
Set-Cookie: ASPSESSIONIDQATRTDCS=PFLKGCNDAFJDANEGOKBFDMMM; path=/
Cache-control: private

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 18 Mar 2014 09:15:43 GMT
Content-Type: text/html
Content-Length: 133325
Last-Modified: Tue, 18 Mar 2014 09:00:06 GMT
Connection: keep-alive
Accept-Ranges: bytes

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions