Skip to content

Commit 3a94dbc

Browse files
authored
Merge pull request #3187 from cdonati/release-3.8.1
Update 3.8 release branch
2 parents 0c3a939 + 29512a8 commit 3a94dbc

5 files changed

Lines changed: 20 additions & 18 deletions

File tree

AppServer/google/appengine/tools/devappserver2/module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def _handle_request_impl(self, environ, start_response, inst=None,
581581
try:
582582
environ['SERVER_PORT'] = environ['HTTP_HOST'].split(':')[1]
583583
except IndexError:
584-
scheme = environ['HTTP_X_FORWARDED_PROTO']
584+
scheme = environ.get('HTTP_X_FORWARDED_PROTO', 'http')
585585
if scheme == 'http':
586586
environ['SERVER_PORT'] = 80
587587
else:

AppTaskQueue/appscale/taskqueue/push_worker.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -152,35 +152,30 @@ def execute_task(task, headers, args):
152152
update_task(args['task_name'], TASK_STATES.FAILED)
153153
return
154154

155-
# Targets do not get X-Forwarded-Proto from nginx, they use haproxy port.
156-
headers['X-Forwarded-Proto'] = url.scheme
157-
if url.scheme == 'http':
158-
connection = httplib.HTTPConnection(remote_host, url.port)
159-
elif url.scheme == 'https':
160-
connection = httplib.HTTPSConnection(remote_host, url.port)
161-
else:
162-
logger.error("Task %s tried to use url scheme %s, "
163-
"which is not supported." % (
164-
args['task_name'], url.scheme))
165-
166-
skip_host = False
167-
if 'host' in headers or 'Host' in headers:
168-
skip_host = True
155+
# Tasks should use HTTP to bypass scheme redirects since they use HAProxy.
156+
connection = httplib.HTTPConnection(remote_host, url.port)
169157

170158
skip_accept_encoding = False
171159
if 'accept-encoding' in headers or 'Accept-Encoding' in headers:
172160
skip_accept_encoding = True
173161

174162
connection.putrequest(method,
175163
urlpath,
176-
skip_host=skip_host,
177164
skip_accept_encoding=skip_accept_encoding)
178165

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

183170
for header in headers:
171+
# Avoid changing the host header from the HAProxy location. Though GAE
172+
# supports host-based routing, we need to make some additional changes
173+
# before we can behave in a similar manner. Using the HAProxy location
174+
# for the host header allows the dispatcher to try extracting a port,
175+
# which it uses to set environment variables for the request.
176+
if header == b'Host':
177+
continue
178+
184179
connection.putheader(header, headers[header])
185180

186181
if 'content-type' not in headers or 'Content-Type' not in headers:

Hermes/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
'kazoo',
1616
'tornado',
1717
'psutil==5.6.3',
18-
'attrs>=18.1.0',
18+
'attrs>=18.1.0,<19.2.0', # 19.2.0 removed "convert" attribute.
1919
'mock',
2020
],
2121
test_suite='appscale.hermes',

RELEASE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
/_/ |_/ .___/ .___//____/\___/\__,_/_/ \___/
66
/_/ /_/
77

8+
AppScale version 3.8.1, released October 2019
9+
Highlights of features and defects fixed in this release:
10+
- Fixes a regression in the 3.8 release where push tasks could not be executed
11+
if the task URL had "secure: always" set.
12+
13+
Known Issues:
14+
815
AppScale version 3.8.0, released September 2019
916
Highlights of features and defects fixed in this release:
1017
- Login continue scheme

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
/ ___ |/ /_/ / /_/ /___/ / /__/ /_/ / // __/
55
/_/ |_/ .___/ .___//____/\___/\__,_/_/ \___/
66
/_/ /_/
7-
AppScale version 3.8.0
7+
AppScale version 3.8.1

0 commit comments

Comments
 (0)