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

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:

GET: test.html
ACCEPT: Content-type: text/html
ACCEPT: encoding: iso 8859-1
....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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.