Article delegate-en/3148 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3146@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Strange behavior with HTTP 307
09 Mar 2006 07:42:19 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


In message <_A3146@delegate-en.ML_> on 03/08/06(22:46:41)
you "Raphael Turbatte" <pjagabdyi-cv6iw6rlawdr.ml@ml.delegate.org> wrote:
 |I launched Delegate in detailed logging mode to check what was
 |happening, then launched Internet Explorer and tried to go to
 |www.about.com . Here is an extract of what I found in the log (I
 |removed the timestamp part to make it easier to read):
 |---
 |* HTTP Relay_request_head (26 bytes/2 lines)
 |* Proxy: host=localhost; User-Agent: ; DIRECT
 |* HTTP Relay_request done (26 bytes/2 lines)
 |* REQUEST - CONNECT www.about.com:80 HTTP/1.1^M
 |* ImMaster? 0 <http://-:80> <http://www.about.com:80/>
 |* To another server or proxy, THRU >>> www.about.com:80 HTTP/1.1^M
 |* REMOTE > CONNECT www.about.com:80 HTTP/1.1^M
 |* gethostbyname(www.about.com).
 |* TMPFILE(regGetResolvConf) = (26) C:/Program
 |Files/DeleGate/tmp/dg1544.1.1141824397
 |* >>>TMPFILE(regGetResolvConf)>>>6699d0[26]
 |* *** gethostbyname(www.about.com): www.about.akadns.net / 0.01 secs.
 |has_alias:1
 |* HOSTS[8]={www.about.akadns.net,www.about.com}/207.241.148.80
 |* not PERMITTED_PAIR
 |* PERMITTED: https://www.about.com
 |* ClosedOnTimeout(0): time=1141824397/1141824427 ppid=3352/3352 pid=1544/1544
 |* StickyServer done [httpCONNECT] 2 req / 1 conn / 0 sec
 |* ====> NO CONNECT was specified for: www.about.com:localhost
 |* ConnectToServer connect https://www.about.com:80
 |----
 |The log shows "not PERMITTED_pair" when the connect request is sent
 |and then shows that Delegate transforms the request into https instead
 |of http, it seems.

There is no transformation achieved, but DeleGate represents the permission
of "CONNECT" method with protocol name "https" in historical reason.
You should have seen that the connection is made to the server without
forbidden by DeleGate, in the remaining part of the LOGFILE.

The question is why the client is retrying with CONNECT method to connect
the server, reacting to 307? response.
What is the User-Agent in this case?

 |Strangely enough, my config file has nearly no restrictions on that part:
 |----
 |SERVER="http"
 |RELAY="proxy:*:*:*"
 |PERMIT="*:*:localhost"
 |CONNECT="direct:http:*:*"
 |MYAUTH="turbatter:****:www.cfauth.com"
 |CACHE="no"
 |RESOLV="sys"
 |----

To see what is the problem, it will helpful to inspect the sequence of
requests and responses including:

  1) the original request toward the upstream proxy
  2) the response from the upstream proxy (with 307 code?)
  3) the second request sent from the client
  4) the second response from the upstream proxy

These can be peeped with the following parameters:

  FSV=-tee-n-h
  FCL=-tee-n-h


If the response code is not 307 but is 407 with "Proxy-Authencication",
it simply represents that the upstream proxy requires Proxy authentication.
Proxy authentication will be done like follows:

  HTTPCONF="add-qhead:Proxy-Authorization: Basic XXXX"

XXXX is the Base64 string of "username:passWord" which should be
shown in your LOGFILE, or the output of the following command

  echo -n "userName:passWord" | delegated -FenMime -b

Cheers,
Yutaka
--
  D G   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( - )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V