The code must not be handling 100 continue. Sort of odd that your proxy server would be doing that since WebRepoMain doesn't use that sort of POST request processing. But that is the problem - your proxy server is changing the request flow to require 100 continue
SlimerDudeThu 2 Aug 2012
Yeah, you're right. It looks like Apache's mod_proxy_http is doing the dirty for when I run fanr directly (say, on port 80) it all works fine.
Some cite it's a problem with an Expect early request header, but there seems to be no resolute solution.
SlimerDudeThu 2 Aug 2012
Further digging reveals that Apache's mod_proxy_http is (somewhat) correct as the 100 Continue response is part of the HTTP/1.1 spec.
A quick fix is for Fanr to use HTTP/1.0 as that doesn't specify any 1xx response codes, hence none will be sent.
Is this worthy of a ticket?
brianThu 2 Aug 2012
Yes I will look at it. At the beach this week, but its already on my todo list. Right now WebClient doesn't automatically handle 100, and often times you need low level control of checking for that before posting the content. But there are some convenience methods on WebClient which I should change to just automatically handle 100 like I do redirects.
brianFri 24 Aug 2012
Going back and looking at the code, I actually think the Fantom side is all correct. That code is requesting a 100 continue from the server, then does the post, then reads the server's response after post is done. That response after the POST should be 200, but your proxy server is still returning 100. That doesn't make sense - the 100 should only be returned before the POST. So that looks something fishy on proxy server side of things.
tcolarMon 17 Sep 2012
I've looked into that too but there does not seem to be any workaround for apache. They seem to not think that is a bug and won't fix it. I guess it's a different interpretation of the spec. I guess I feel apache is wrong on that one though.
It works with nginx, so one solution is to either use nginx or use it as a proxy in front of apache and have it serve fanr requests.
On the other apache is (still) so prevalent as the font-end web server in front of java/fantom servers I'm not sure it's such a good idea to be incompatible with it, it's not like there is such a huge gain/need to use 100-continue.
DanielFathTue 18 Sep 2012
Some kind of APACHE_MODE then? Something that will tell server to act differently when it works with Apache?
SlimerDude Wed 1 Aug 2012
Hi,
I've started a simple fanr repo over http on a server with:
and patched it through a reverse proxy on apache.
When I try to publish pods with
the upload works and I can see the pod in a query, such as:
but the publish command always fails with:
Any thoughts on what I'm doing wrong?
brian Wed 1 Aug 2012
The code must not be handling 100 continue. Sort of odd that your proxy server would be doing that since WebRepoMain doesn't use that sort of POST request processing. But that is the problem - your proxy server is changing the request flow to require 100 continue
SlimerDude Thu 2 Aug 2012
Yeah, you're right. It looks like Apache's
mod_proxy_http
is doing the dirty for when I runfanr
directly (say, on port 80) it all works fine.My apache vhost conf is as simple as:
But looking around it seems
mod_proxy
asynchronously sends the100 Continue
before replying with the actual request from the server.Some cite it's a problem with an
Expect early
request header, but there seems to be no resolute solution.SlimerDude Thu 2 Aug 2012
Further digging reveals that Apache's
mod_proxy_http
is (somewhat) correct as the100 Continue
response is part of the HTTP/1.1 spec.A quick fix is for Fanr to use HTTP/1.0 as that doesn't specify any 1xx response codes, hence none will be sent.
Is this worthy of a ticket?
brian Thu 2 Aug 2012
Yes I will look at it. At the beach this week, but its already on my todo list. Right now WebClient doesn't automatically handle 100, and often times you need low level control of checking for that before posting the content. But there are some convenience methods on WebClient which I should change to just automatically handle 100 like I do redirects.
brian Fri 24 Aug 2012
Going back and looking at the code, I actually think the Fantom side is all correct. That code is requesting a 100 continue from the server, then does the post, then reads the server's response after post is done. That response after the POST should be 200, but your proxy server is still returning 100. That doesn't make sense - the 100 should only be returned before the POST. So that looks something fishy on proxy server side of things.
tcolar Mon 17 Sep 2012
I've looked into that too but there does not seem to be any workaround for apache. They seem to not think that is a bug and won't fix it. I guess it's a different interpretation of the spec. I guess I feel apache is wrong on that one though.
It works with nginx, so one solution is to either use nginx or use it as a proxy in front of apache and have it serve fanr requests.
On the other apache is (still) so prevalent as the font-end web server in front of java/fantom servers I'm not sure it's such a good idea to be incompatible with it, it's not like there is such a huge gain/need to use 100-continue.
DanielFath Tue 18 Sep 2012
Some kind of APACHE_MODE then? Something that will tell server to act differently when it works with Apache?