| | |
Problem in identifying HTTP request field for enoded type (base64 or binary)
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2007
Posts: 2
Reputation:
Solved Threads: 0
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
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
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:
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.
! Well, kind of. The HTTP requests I got from Opera browser during testing looked somthing like this: C++ Syntax (Toggle Plain Text)
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.
The one question you should not ask when teaching a new language structure is "Do you understand?". Do you understand?
![]() |
Similar Threads
- Http request error when using AJAX. (JavaScript / DHTML / AJAX)
- Redirection issues... (Perl)
- PHP installation possible errors? (PHP)
- How many PHP scripts can run concurrently via http request? (PHP)
- HTTP request in C (C)
- send http request?? (C++)
- HTTP Request Message Issue (PHP)
Other Threads in the C++ Forum
- Previous Thread: Is there a better way to store these variables?
- Next Thread: C++ Variable help
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





