all groups > dotnet web services > april 2005 >
You're in the

dotnet web services

group:

How to remove HTTP Header [Expect: 100-continue]



How to remove HTTP Header [Expect: 100-continue] Christian Lutz
4/8/2005 7:59:03 AM
dotnet web services: Hy there

I have a Web Services written in Java, running on Tomcat. The Client is
written in C#. When i monitor the request/Response with TCPMon (included in
Tomcat) i can observer the following sequence:

********************************************
CLIENT:: Request
********************************************

POST /axis/services/AgencyGatewayPort HTTP/1.1
User-Agent: Axis/1.1
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 639
Expect: 100-continue
Connection: Keep-Alive
Host: localhost

<?xml version="1.0" encoding="utf-8"?>
....


********************************************
SERVER:: Response
********************************************
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=8E01AF57B2FF5BBFB22BF6E4BEA65FBB; Path=/axis
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 08 Apr 2005 14:07:59 GMT
Server: Apache-Coyote/1.1

2000
<?xml version="1.0" encoding="UTF-8"?>
....


After the WS-call i don't have access to my object. All object are set to
null.
I have tried to manipulate the HTTP-Header (remove Expect: 100-continue).
But it's not possible to remove this header. In the documentation i've found,
that some header-elements could not be changed.

In my oppinion the response from Tomcat look a little bit strange. My
question is: Is it possible to change my HTTP-Header? I have another sample
written in Java and this sample does work. The Java Client Header look like
this:

********************************************
Java CLIENT:: Request
********************************************
POST /axis/services/AgencyGatewayPort HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 926
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx

Thakns in advance!



Re: How to remove HTTP Header [Expect: 100-continue] Alex Passos
4/8/2005 11:10:17 AM
Is the response coming in on one trip or 2?

Normally (in other cases such as redirects) you see the client getting a
RESPONSE to redirect, then client makes another requests and gets a 200 Ok.
Is it possible these 2 are separate responses? You get 100, then send
request again and get 200? What else was in the body of the 100 response?

Alex

[quoted text, click to view]

Re: How to remove HTTP Header [Expect: 100-continue] Christian Lutz
4/10/2005 11:42:02 PM
The Response is coming in one trip. The answer from the server you see is one
response. The server sends 100 and the 200 response at once.

cu luc




[quoted text, click to view]
Re: How to remove HTTP Header [Expect: 100-continue] Rafal Gwizdala
4/11/2005 12:00:00 AM
[quoted text, click to view]

You could try using HTTP 1.0 instead of 1.1. I don't know how to achieve
this, haven't programmed in Java/Tomcat for quite a long now. Probably
there is some client side API for choosing HTTP version, or you can
reconfigure the server to use only HTTP 1.0.

Best regards
AddThis Social Bookmark Button