Show More
@@ -104,6 +104,13 b' do not use the proxy if it is in the no ' | |||
|
104 | 104 | new changesets 83180e7845de |
|
105 | 105 | updating to branch default |
|
106 | 106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | ||
|
108 | proxy can't connect to server | |
|
109 | ||
|
110 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT2/ h | |
|
111 | abort: HTTP Error 404: Connection refused | |
|
112 | [100] | |
|
113 | ||
|
107 | 114 | $ cat proxy.log |
|
108 | 115 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
109 | 116 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
@@ -120,3 +127,5 b' do not use the proxy if it is in the no ' | |||
|
120 | 127 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
121 | 128 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
122 | 129 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
130 | * - - [*] code 404, message Connection refused (glob) | |
|
131 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT2/?cmd=capabilities HTTP/1.1" 404 - (glob) |
@@ -74,12 +74,8 b' class ProxyHandler(httpserver.basehttpre' | |||
|
74 | 74 | print("\t" "connect to %s:%d" % host_port) |
|
75 | 75 | try: |
|
76 | 76 | soc.connect(host_port) |
|
77 |
except socket.error as |
|
|
78 | try: | |
|
79 | msg = arg[1] | |
|
80 | except (IndexError, TypeError): | |
|
81 | msg = arg | |
|
82 | self.send_error(404, msg) | |
|
77 | except socket.error as e: | |
|
78 | self.send_error(404, e.strerror) | |
|
83 | 79 | return 0 |
|
84 | 80 | return 1 |
|
85 | 81 |
General Comments 0
You need to be logged in to leave comments.
Login now