Problem in identifying HTTP request field for enoded type (base64 or binary)

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2007
Posts: 2
Reputation: pntkiran is an unknown quantity at this point 
Solved Threads: 0
pntkiran pntkiran is offline Offline
Newbie Poster

Problem in identifying HTTP request field for enoded type (base64 or binary)

 
0
  #1
Jun 9th, 2007
Hi all,

I parse HTTP request(using post method) coming from client.file can be either of binary or base64 encoded.I need to process them differently for each case.
(if(binary type)
call method1();
else
call decode();
// and then
call method1()))
How will I come to know which kind of encoding method is used at client side from header?Is there any field describe "encoded method:base64" in header?
i.e. "Content-Length" tells length of data.

Regards,
Kiran
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 263
Reputation: Mushy-pea is an unknown quantity at this point 
Solved Threads: 1
Mushy-pea's Avatar
Mushy-pea Mushy-pea is offline Offline
Posting Whiz in Training

Re: Problem in identifying HTTP request field for enoded type (base64 or binary)

 
0
  #2
Jun 11th, 2007
Hi. I wrote a simple test web server script in Perl a few months ago. Did I read any HTTP specification documents before starting to find out what I'd need to parse? Hell no, I just listened on port 80 and reverse engineered the protocol from there ! Well, kind of. The HTTP requests I got from Opera browser during testing looked somthing like this:

  1. GET: test.html
  2. ACCEPT: Content-type: text/html
  3. ACCEPT: encoding: iso 8859-1
  4. ....etc

So, basically the browser said what file it wanted and then listed what kind of response would be acceptable (including the expected encoding type). I hope this helps.

Steven.
The one question you should not ask when teaching a new language structure is "Do you understand?". Do you understand?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC