比较来自世界各地的卖家的域名和 IT 服务价格

力量 mod_proxy_http 发送答案异步 (没有 100 Continue)

机械材料 (Jetty) 适用于服务器 Apache Httpd, 转移使用

mod_proxy_http

. 它推出了一个小的servlet

PUT

请求和通过基本身份验证进行身份验证 HTTP (由B处理。 Jetty).

直率 (没有代理)

PUT

要求。

curl

, 使用不正确的凭据进行身份验证,服务器返回状态代码 401, 正如预期的那样:

curl -v -T testfile -u user:WRONG_PASSWORD [url=http://localhost:8080/myservlet/]http://localhost:8080/myservlet/[/url]

一旦获得状态代码,就可以将此中断请求 curl 不加载整个身体,然后停止 (

HTTP error before end of send, stop sending

).

* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Server auth using Basic with user 'user'
> PUT /myservlet/testfile HTTP/1.1
> Authorization: Basic xxxxxxxxxxxxxxxxx
> User-Agent: curl/7.22.0
> Host: localhost:8080
> Accept: */*
> Content-Length: 3672
> Expect: 100-continue
>
< HTTP/1.1 401 Unauthorized
< Date: xxxxxxxxxxxxxxxx
* Authentication problem. Ignoring this.
< WWW-Authenticate: basic realm="Test Realm"
< Content-Length: 0
< Server: Jetty(7.4.5.v20110725)
* HTTP error before end of send, stop sending
<
* Closing connection #0

相反,后面

mod_proxy_http

, 有

100 Continue

答案几乎立即发送 Apache Httpd, 哪一个 curl 解释为

continue

, 所以他派出整个请求 (

We are completely uploaded and fine

) 在他最终得到之前

401

回答。

*   Trying 127.0.0.1... connected
* Server auth using Basic with user 'user'
> PUT /myservlet/testfile HTTP/1.1
> Authorization: Basic xxxxxxxxxxxxxxxxx
> User-Agent: curl/7.22.0
> Host: localhost
> Accept: */*
> Content-Length: xxxxxx
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 401 Unauthorized
< Date: xxxxxxxxxxxxxxxx
< Server: Jetty(7.4.5.v20110725)
* Authentication problem. Ignoring this.
< WWW-Authenticate: basic realm="Test Realm"
< Content-Length: 0
< Via: 1.1 localhost
< Content-Type: xxxxxxxxxxxxxx
<
* Connection #0 to host localhost left intact
* Closing connection #0

有没有办法防止

mod_proxy_http

从使用

100 Continue

代码并让他等待

401

在发送第一个答案之前,来自内部服务器的状态代码?

我试着跟着
https://serverfault.com/a/302539/47187
, 但它没有解决问题 (在任何情况下,它都不是同一个问题。):

    ProxyPass /myservlet/ [url=http://localhost:8080/myservlet/]http://localhost:8080/myservlet/[/url]
<location myservlet=""></location>
RequestHeader unset Expect early

已邀请:

要回复问题请先登录注册