Skip to content

Commit

Permalink
Merge pull request #3187 from cdonati/release-3.8.1
Browse files Browse the repository at this point in the history
Update 3.8 release branch
  • Loading branch information
obino authored Oct 17, 2019
2 parents 0c3a939 + 29512a8 commit 3a94dbc
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion AppServer/google/appengine/tools/devappserver2/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def _handle_request_impl(self, environ, start_response, inst=None,
try:
environ['SERVER_PORT'] = environ['HTTP_HOST'].split(':')[1]
except IndexError:
scheme = environ['HTTP_X_FORWARDED_PROTO']
scheme = environ.get('HTTP_X_FORWARDED_PROTO', 'http')
if scheme == 'http':
environ['SERVER_PORT'] = 80
else:
Expand Down
25 changes: 10 additions & 15 deletions AppTaskQueue/appscale/taskqueue/push_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,35 +152,30 @@ def execute_task(task, headers, args):
update_task(args['task_name'], TASK_STATES.FAILED)
return

# Targets do not get X-Forwarded-Proto from nginx, they use haproxy port.
headers['X-Forwarded-Proto'] = url.scheme
if url.scheme == 'http':
connection = httplib.HTTPConnection(remote_host, url.port)
elif url.scheme == 'https':
connection = httplib.HTTPSConnection(remote_host, url.port)
else:
logger.error("Task %s tried to use url scheme %s, "
"which is not supported." % (
args['task_name'], url.scheme))

skip_host = False
if 'host' in headers or 'Host' in headers:
skip_host = True
# Tasks should use HTTP to bypass scheme redirects since they use HAProxy.
connection = httplib.HTTPConnection(remote_host, url.port)

skip_accept_encoding = False
if 'accept-encoding' in headers or 'Accept-Encoding' in headers:
skip_accept_encoding = True

connection.putrequest(method,
urlpath,
skip_host=skip_host,
skip_accept_encoding=skip_accept_encoding)

# Update the task headers
headers['X-AppEngine-TaskRetryCount'] = str(task.request.retries)
headers['X-AppEngine-TaskExecutionCount'] = str(task.request.retries)

for header in headers:
# Avoid changing the host header from the HAProxy location. Though GAE
# supports host-based routing, we need to make some additional changes
# before we can behave in a similar manner. Using the HAProxy location
# for the host header allows the dispatcher to try extracting a port,
# which it uses to set environment variables for the request.
if header == b'Host':
continue

connection.putheader(header, headers[header])

if 'content-type' not in headers or 'Content-Type' not in headers:
Expand Down
2 changes: 1 addition & 1 deletion Hermes/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'kazoo',
'tornado',
'psutil==5.6.3',
'attrs>=18.1.0',
'attrs>=18.1.0,<19.2.0', # 19.2.0 removed "convert" attribute.
'mock',
],
test_suite='appscale.hermes',
Expand Down
7 changes: 7 additions & 0 deletions RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
/_/ |_/ .___/ .___//____/\___/\__,_/_/ \___/
/_/ /_/

AppScale version 3.8.1, released October 2019
Highlights of features and defects fixed in this release:
- Fixes a regression in the 3.8 release where push tasks could not be executed
if the task URL had "secure: always" set.

Known Issues:

AppScale version 3.8.0, released September 2019
Highlights of features and defects fixed in this release:
- Login continue scheme
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
/ ___ |/ /_/ / /_/ /___/ / /__/ /_/ / // __/
/_/ |_/ .___/ .___//____/\___/\__,_/_/ \___/
/_/ /_/
AppScale version 3.8.0
AppScale version 3.8.1

0 comments on commit 3a94dbc

Please sign in to comment.