Loading ...
Sorry, an error occurred while loading the content.

AW: [soaplite] Multiple "Accept" tags in the HTTP Request Header

Expand Messages
  • Martin Busik
    Hi, ... Yes. See http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z3 Cheers, Martin ... Yes. use SOAP::Lite (+trace = [ transport = &rewrite_headers ]);
    Message 1 of 2 , Sep 12, 2009
    View Source
    • 0 Attachment
      Hi,

      > Please help me with answers to the following questions.
      >
      > 1. Are multiple/repeated "Accept" tags allowed in the HTTP
      > request headers?

      Yes. See http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z3

      Cheers,
      Martin


      > 2. Is there a way to send a single "Accept" tag with values
      > concatenated instead of sending multiple occurances?

      Yes.

      use SOAP::Lite (+trace => [ "transport" => \&rewrite_headers ]);

      ...

      sub rewrite_headers {
      my $r = shift;
      if(UNIVERSAL::isa($r,"HTTP::Request")) {
      $r->header(Accept => "text/html; multipart/*; application/soap");
      }
      }

      Cheers,
      Martin
    Your message has been successfully submitted and would be delivered to recipients shortly.