Hi all, I am using Net::SSLeay to connect to SSL server. I am generating the fillowing xml request along with specific headers as,
Headers : POST /AUTHORIZE HTTP/1.0 MIME-Version: 1.0 Content-Type: application/PTI42 Content-length: 210 Content-transfer-encoding: text Request-number: 1 Document-type: Request Request : <?xml version="1.0" encoding="UTF-8"?> <Request> <NewOrder> <MessageType>A</MessageType> <BIN>000002</BIN> <TerminalID>001</TerminalID> <AVSzip>33408</AVSzip> </NewOrder> </Request>;
but every time I m getting the HTTP/1.1 400 Bad Request error.

Here I want to mention that all the header fields except "POST /AUTHORIZE HTTP/1.0" are being prepared by Net::SSLeay's make_header method and I am concating "POST /AUTHORIZE HTTP/1.0" to them by using "\r\n". While searching I found that header fields are separated bu CRLF(carriage return and line feed). is it done by \r\n in perl?????

If anybody can tell me where should I concentrate so that I will overcome the problem. Docs says that this error corresponds to " 400 Invalid Request: The server, due to malformed syntax, could not understand the request. " Please advice. Thanks, Sham.

In reply to HTTP/1.1 400 Bad Request by Sham

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.