pshieh has asked for the wisdom of the Perl Monks concerning the following question:

I am using NET::SSLeay to access a xml site by post_https, and I need to post a header: SOAPAction: "http://bwcg.hk/Services" in the request. My header code is as bellow in the post_https():
make_headers(Content-Type => 'text/xml', SOAPAction => ""http://bwcg.h +k/Services"")
The problem is that the xml server didn't recognize the "s and read the header as: SOAPAction: http://bwcg.hk/Services, instead of my intended: SOAPAction: "http://bwcg.hk/Services"

What should I put in make_headers() to send header: SOAPAction: "http://bwcg.hk/Services" to the xml server?

Thank you very much for your kind help.

Replies are listed 'Best First'.
Re: Net:SSLeay headers
by almut (Canon) on Oct 29, 2008 at 14:45 UTC
    make_headers(Content-Type => 'text/xml', SOAPAction => ""http://bwcg.h +k/Services"")

    Are you sure this is the code you're using? (it doesn't even compile)  Maybe you could try

    make_headers('Content-Type' => 'text/xml', SOAPAction => '"http://bwcg +.hk/Services"');

    Or, try specifying the double quotes as %22 (URI encoding), or " (entity encoding).  This is just a guess, though — from the top of my head, I can't tell what's expected in an HTTP/SOAP header...

    Update: just checked it: there doesn't seem to be any general problem with double quotes in HTTP headers — though I'm not sure what further processing the SOAP backend is applying to the value...

      Thank you very much, %22 works.