469,585 Members | 2,189 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,585 developers. It's quick & easy.

Parsing http head request resposnse from server.

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

Feb 8 '07 #1
1 2071
On Feb 7, 11:06 pm, "Raaga" <amitrai2...@gmail.comwrote:
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

Feb 8 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by turnit \(removethis\) | last post: by
1 post views Thread by Agoston Bejo | last post: by
2 posts views Thread by Robert | last post: by
reply views Thread by WIWA | last post: by
8 posts views Thread by =?Utf-8?B?TTFpUw==?= | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.