Skip to content

Commit

Permalink
Merge pull request XX-net#8717 from wooowooo/patch-1
Browse files Browse the repository at this point in the history
fix gae HTTP upper case bug
  • Loading branch information
xxnet authored Nov 28, 2017
2 parents a09b428 + 17d44d8 commit e1f89d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/default/gae_proxy/local/gae_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def request_gae_proxy(method, url, headers, body, timeout=60, retry=True):


def handler(method, url, headers, body, wfile):
if not url.startswith("http"):
if not url.startswith("http") and not url.startswith("HTTP"):
xlog.error("gae:%s", url)
return

Expand Down
4 changes: 2 additions & 2 deletions code/default/x_tunnel/local/proxy_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def http_handler(self, first_char):
# if method not in ["GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS", "TRACE", "PATCH"]:
# xlog.warn("https req method not known:%s", method)

if url.startswith("http://"):
if url.startswith("http://") or url.startswith("HTTP://"):
o = urlparse.urlparse(url)
host, port = netloc_to_host_port(o.netloc)

Expand Down Expand Up @@ -340,4 +340,4 @@ def redirect_process(sock, host, port, client_address=""):


def redirect_handler(sock, host, port, client_address=""):
threading.Thread(target=redirect_process, args=(sock, host, port, client_address)).start()
threading.Thread(target=redirect_process, args=(sock, host, port, client_address)).start()

0 comments on commit e1f89d5

Please sign in to comment.