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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.