Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Parsing http head request resposnse from server.

Reply
Thread Tools

Parsing http head request resposnse from server.

 
 
Raaga
Guest
Posts: n/a
 
      02-08-2007
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

 
Reply With Quote
 
 
 
 
dev_jg
Guest
Posts: n/a
 
      02-08-2007
On Feb 7, 11:06 pm, "Raaga" <amitrai2...@gmail.com> wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP head request Trans Ruby 4 10-05-2007 06:05 PM
GeForce 7800 GTX Head-to-Head @ TrustedReviews Silverstrand Front Page News 0 09-12-2005 11:25 PM
Re: Can I get at contents of <head></head> programmatically? Karl ASP .Net 0 09-15-2004 06:09 PM
PHP and ASP.NET go HEAD to HEAD showme ASP .Net 13 07-10-2004 09:44 PM
Injecting code into the <head></head> section Brian W ASP .Net 10 07-02-2003 07:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57