Jump to content

curl returns two headers


bugcoder

Recommended Posts

I send a request to just one url using curl but its responding two headers. one with "HTTP/1.1 401 Unauthorized" and other "HTTP/1.1 200 OK"

 

Why it is returning first one header? what im doing wrong in this case?

 

Dont need this one:-

HTTP/1.1 401 Unauthorized

Content-Type: text/html

Server: Microsoft-IIS/7.5

X-Powered-By: PHP/5.3.5 ZendServer

WWW-Authenticate: Digest realm="api.xyz.net", domain="/", qop=auth, algorithm=MD5, nonce="xyz", opaque="xyz"

X-Powered-By: abc

on: marge

Date: Fri, 19 Aug 2011 15:59:42 GMT

Content-Length: 57

 

requires only this one:-

 

HTTP/1.1 200 OK

Content-Type: application/xml; charset=utf-8

Server: Microsoft-IIS/7.5

X-Powered-By: PHP/5.3.5 ZendServer

X-Powered-By: abc

on: marge

Date: Fri, 19 Aug 2011 15:59:44 GMT

Content-Length: 212

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/245212-curl-returns-two-headers/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.