4 Replies Latest reply on Oct 24, 2006 1:37 AM by 807573

    The proxy server return 417 error code.

      This is the request network package:

      Notic: the url adress was replace by for some reasonse.

      POST HTTP/1.1
      User-Agent: IIC2.0/PC
      Content-Length: 236
      Expect: 100-continue

      This is the response from the proxy server:

      HTTP/1.1 417 Expectation Failed
      Server: Sun-Java-System-Web-Proxy-Server/4.0.2
      Date: Tue, 17 Oct 2006 02:46:47 GMT
      Content-length: 0
      Content-type: text/html
      Connection: close

      Why the proxy server return this?And is the user-agent in the request network package was correctly set? Or there should not have any spaces in the value of the user agent header values?

      What should I do to make sure that the proxy will work fine for this request? Or this is just a configuaration problem of the proxy server?

      Thank you for you help. :D
        • 1. Re: The proxy server return 417 error code.
          By the way. The content flowing was orginal in the rfc 2616:

          14.43 User-Agent

          The User-Agent request-header field contains information about the
          user agent originating the request. This is for statistical purposes,
          the tracing of protocol violations, and automated recognition of user
          agents for the sake of tailoring responses to avoid particular user
          agent limitations. User agents SHOULD include this field with
          requests. The field can contain multiple product tokens (section 3.8)
          and comments identifying the agent and any subproducts which form a
          significant part of the user agent. By convention, the product tokens
          are listed in order of their significance for identifying the

          User-Agent = "User-Agent" ":" 1*( product | comment )


          User-Agent: CERN-LineMode/2.15 libwww/2.17b3

          The example has spaces. And is this correct?
          • 2. Re: The proxy server return 417 error code.
            I had search the rfc 2616 document. And this is the error code explain:

            10.4.18 417 Expectation Failed

            The expectation given in an Expect request-header field (see section
            14.20) could not be met by this server, or, if the server is a proxy,
            the server has unambiguous evidence that the request could not be met
            by the next-hop server.

            And the following explain the reason:

            14.20 Expect

            The Expect request-header field is used to indicate that particular
            server behaviors are required by the client.

            Expect = "Expect" ":" 1#expectation

            expectation = "100-continue" | expectation-extension
            expectation-extension = token [ "=" ( token | quoted-string )
            *expect-params ]
            expect-params = ";" token [ "=" ( token | quoted-string ) ]

            A server that does not understand or is unable to comply with any of
            the expectation values in the Expect field of a request MUST respond
            with appropriate error status. The server MUST respond with a 417
            (Expectation Failed) status if any of the expectations cannot be met
            or, if there are other problems with the request, some other 4xx

            This header field is defined with extensible syntax to allow for
            future extensions. If a server receives a request containing an
            Expect field that includes an expectation-extension that it does not
            support, it MUST respond with a 417 (Expectation Failed) status.

            Comparison of expectation values is case-insensitive for unquoted
            tokens (including the 100-continue token), and is case-sensitive for
            quoted-string expectation-extensions.

            The Expect mechanism is hop-by-hop: that is, an HTTP/1.1 proxy MUST
            return a 417 (Expectation Failed) status if it receives a request
            with an expectation that it cannot meet. However, the Expect
            request-header itself is end-to-end; it MUST be forwarded if the
            request is forwarded.

            Many older HTTP/1.0 and HTTP/1.1 applications do not understand the
            Expect header.

            See section 8.2.3 for the use of the 100 (continue) status.

            So I read the section 8.23 in rfc 2616 and I found that the exactly reason why the server return 417 is that the server doesn't recognize the header:

            Expect: 100-continue

            So the Sun-Java-System-Web-Proxy-Server/4.0.2 return 417.

            And what's your suggestion for this? Should I upgrade the proxy server?
            • 3. Re: The proxy server return 417 error code.
              It is not a problem with your user agent string.

              Does your proxy go through another proxy (is it chained?)

              what is your obj.conf? and magnus.conf?

              and can you please post your error log at the point when this happened too?

              proxy supports the 100-continue and expect. so should support this request.

              See this thread in webserver forum

              Please verify what your webserver sends back. (paste the snoops of proxy - to - server traffic here.)

              (I would recommend updation to the latest service pack though since there are more bugfixes in the latest ones. but that has nothing to do with this.)
              • 4. Re: The proxy server return 417 error code.
                Thank you for your replay.

                I had solved the problem myself.

                The exactly reason why this happed was that the proxy server doesn't support this header:

                Expect: 100-Continu.

                I had find a way to remove the header from the http request. And the request worked very well now.

                Thank you.:D