set cookie in nusoap web service, IE behaves diff than Firefox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johnny

    #1

    set cookie in nusoap web service, IE behaves diff than Firefox

    Searched on google for any info relating to this before posting here but
    found none.

    I set up a web service using nusoap on apache php 4.3.8 on windows with
    error_reporting = E_ALL and had that service set a cookie in the client
    browser as the first output.
    Works fine in IE6 and the service returns the state of the cookie in the
    client browser but in firefox 1.0 the exact same service gives a notice
    error about an undefined variable like so:

    <b>Notice</b>: Undefined index: Content-Type in <b>i:program filesapache
    groupapachehtdo cs nusoaplib
    nusoap.php</b> on line <b>2468</b>

    took a look at line 2468 in nusoap.php and as the notice says it's about the
    content type header:

    2468 if(strpos($this->headers['Content-Type'],'=')){

    so since the exact same string, as follows, was sent from both IE and
    firefox:
    <?xml version="1.0" encoding="UTF-8"?><soap:Envel ope
    xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
    xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
    xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
    xmlns:n="urn:ge tsetcookie7wsdl "><soap:Bod y
    soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/"><n:getset cook
    ie7><name xsi:type="xsd:s tring">Departme nt
    4</name></n:getsetcookie7 ></soap:Body></soap:Envelope>

    I'm wondering if anyone can shed light on why there would be a difference
    in the response from nusoap.

    It mystifies me. It is the exact same code running on the server
    (apparently) processing the exact same input (windiff shows it to be
    identical).
    I can see from the input that neither sends the content type header so why
    the different response to a message from IE to one from Firefox?

    Thanks for your insight,
    Johnny



  • Colin McKinnon

    #2
    Re: set cookie in nusoap web service, IE behaves diff than Firefox

    Johnny wrote:
    [color=blue]
    > Searched on google for any info relating to this before posting here but
    > found none.
    >
    > I set up a web service using nusoap on apache php 4.3.8 on windows with
    > error_reporting = E_ALL and had that service set a cookie in the client
    > browser as the first output.
    > Works fine in IE6 and the service returns the state of the cookie in the
    > client browser but in firefox 1.0 the exact same service gives a notice
    > error about an undefined variable like so:
    >
    > <b>Notice</b>: Undefined index: Content-Type in <b>i:program filesapache
    > groupapachehtdo cs nusoaplib
    > nusoap.php</b> on line <b>2468</b>
    >
    > took a look at line 2468 in nusoap.php and as the notice says it's about
    > the content type header:
    >
    > 2468 if(strpos($this->headers['Content-Type'],'=')){[/color]

    I've studiously avoided SOAP, but reading what you've said here it doesn't
    appear to be a SOAP related issue. If it works with one browser but not
    another, it rather implies that $this->headers refers to the headers sent
    in the request. I don't think 'Content-Type' is required in the request.
    Try quietening the error reporting (any output before you try to set a
    cookie will flush the headers and therefore make it impossible to set the
    cookie).

    HTH

    C.

    Comment

    • Johnny

      #3
      Re: set cookie in nusoap web service, IE behaves diff than Firefox


      "Colin McKinnon" <colin.deleteth is@andthis.mms3 .com> wrote in message
      news:d5pro2$dcj $1$8300dec7@new s.demon.co.uk.. .[color=blue]
      > Johnny wrote:
      >[color=green]
      > > Searched on google for any info relating to this before posting here but
      > > found none.
      > >
      > > I set up a web service using nusoap on apache php 4.3.8 on windows with
      > > error_reporting = E_ALL and had that service set a cookie in the client
      > > browser as the first output.
      > > Works fine in IE6 and the service returns the state of the cookie in the
      > > client browser but in firefox 1.0 the exact same service gives a notice
      > > error about an undefined variable like so:
      > >
      > > <b>Notice</b>: Undefined index: Content-Type in <b>i:program[/color][/color]
      filesapache[color=blue][color=green]
      > > groupapachehtdo cs nusoaplib
      > > nusoap.php</b> on line <b>2468</b>
      > >
      > > took a look at line 2468 in nusoap.php and as the notice says it's about
      > > the content type header:
      > >
      > > 2468 if(strpos($this->headers['Content-Type'],'=')){[/color]
      >
      > I've studiously avoided SOAP, but reading what you've said here it doesn't
      > appear to be a SOAP related issue. If it works with one browser but not
      > another, it rather implies that $this->headers refers to the headers sent
      > in the request. I don't think 'Content-Type' is required in the request.
      > Try quietening the error reporting (any output before you try to set a
      > cookie will flush the headers and therefore make it impossible to set the
      > cookie).
      >
      > HTH
      >
      > C.[/color]

      Thanks Colin.
      I had seen from the error messages coming back from the soap server that
      the warning level was causing the problem but I'm still wondering how
      sending the same messages to the soap server could cause diffferent
      behavior. My guess is that IE warps the soap message with something that has
      the content type and that Firefox doesn't. Oh well. Thanks for your reply.


      Comment

      Working...