[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ability to receive POST response data with no given response content length



I'm new to HTTPAPI and web programming in general, but have been working with it over the past few weeks, using it for a client's project.   I've been successful making a HTTPS POST BASIC request and receive the response for the one piece of the project, but I've run into a problem for another piece  where the vendor requires a HTTPS POST to request a new password (command=requestnewpassword), resulting with the new password being sent back in the response.
The problem encountered is the response contains no 'content length' parameter, so the data/password cannot be retrieved (as HTTPI ends up with length = 0).  The HTTP_DEBUG log clearly shows "RESPONSE: abcdefg" after the response header dump, but using URL_POST or URL_POST_RAW does not capture the data in the IFS or in a variable.
Going back to the vendor's limited documentation example (basically a dump), the POST request shows content length being transmitted (which I do in my POST), but the response dump does not show content length included (and there is no other references in any instructions).  The question was posed of the vendor, and the response was "No one has ever asked this before, and the only suggestion the programmers came back with is possibly turning off the routine that looks for the content length" - which I don't consider an option.
So, is there any way currently when using HTTPAPI POST to receive the response, regardless of content length (being 0 or not given)?  The only option I've come up with is to actually use the HTTPPI_DEBUG log, copy from stream file to qtemp/temp, read and scan for RESPONSE:, and grab the characters proceeding that label.  Unfortunately, the next step will be another HTTPS POST to request the actual password reset (command=RESETPASSWORD), the receive the response and check for "SUCCESS", which I have to assume will again have no content length given.
On that note, it would be nice to be able to over ride the IFS file name of HTTPAPI_DEBUG for this and to enable multiple DEBUG logs for different users, processes, etc.
Let me know if any additional information is needed. Any insight appreciated!


Carl Forshey
Commsoft



The information contained in this electronic mail transmission is intended by Communications Software Consultants, Inc. for the use of the named individual or entity to which it is directed
and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please notify the sender immediately and delete this
message from your system without copying or forwarding it.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------