Parsing http head request resposnse from server.

R

Raaga

Hi,

I have written an Ajax application which can send http HEAD requests
and receive the header response from server.
Now I want to show the different values in formatted manner. However,
there seems be no character or expression which I can use to split the
HEAD response for string processing.

Here is a sample of server response:

Mime-Version: 1.0 Date: Thu, 08 Feb 2007 03:51:13 GMT Server: Apache/
2.0.1a Content-Type: text/html; charset=utf-8 Content-Length: 69
Connection: close

If you have any information regarding this please do let me know.

Regards,
Raaga
 
D

dev_jg

Hi,

I have written an Ajax application which can send http HEAD requests
and receive the header response from server.
Now I want to show the different values in formatted manner. However,
there seems be no character or expression which I can use to split the
HEAD response for string processing.

Here is a sample of server response:

Mime-Version: 1.0 Date: Thu, 08 Feb 2007 03:51:13 GMT Server: Apache/
2.0.1a Content-Type: text/html; charset=utf-8 Content-Length: 69
Connection: close

If you have any information regarding this please do let me know.

Regards,
Raaga

Try to write out the charCodes of all the characters peresent in the
string you get from server, to see if there were any unprintable
char's, you may see char 13 or 10's in there

var resp//
var i=0
for(i=0;i<resp.length;i++)
{
document.write(resp.charAt(i)+" ----------> "+resp.charCodeAt(i)
+"<br>")
}

let me know what you see
Jas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top