New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Host header sent by MatrixFederationAgent #4468

Merged
merged 2 commits into from Jan 25, 2019

Conversation

Projects
None yet
3 participants
@richvdh
Copy link
Member

richvdh commented Jan 25, 2019

Move the Host header logic down here so that (a) it is used if we reuse the
agent elsewhere, and (b) we can mess about with it with .well-known.

Fix Host header sent by MatrixFederationAgent
Move the Host header logic down here so that (a) it is used if we reuse the
agent elsewhere, and (b) we can mess about with it with .well-known.

@richvdh richvdh requested a review from matrix-org/synapse-core Jan 25, 2019

@erikjohnston
Copy link
Member

erikjohnston left a comment

LGTM modulo needing a newsfile

headers = headers.copy()

if not headers.hasHeader(b'host'):
headers.addRawHeader(b'host', server_name_bytes)

This comment has been minimized.

@erikjohnston

erikjohnston Jan 25, 2019

Member

I'm assuming header names are case insensitive here?

This comment has been minimized.

@richvdh

richvdh Jan 25, 2019

Author Member

yeah, twisted sorts that out for us.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 25, 2019

Codecov Report

Merging #4468 into develop will decrease coverage by 0.01%.
The diff coverage is 83.33%.

@@             Coverage Diff             @@
##           develop    #4468      +/-   ##
===========================================
- Coverage    74.77%   74.75%   -0.02%     
===========================================
  Files          336      336              
  Lines        34023    34062      +39     
  Branches      5533     5540       +7     
===========================================
+ Hits         25439    25462      +23     
- Misses        7014     7026      +12     
- Partials      1570     1574       +4
@richvdh

This comment has been minimized.

Copy link
Member Author

richvdh commented Jan 25, 2019

LGTM modulo needing a newsfile

I made it and failed to commit it :/

@richvdh richvdh merged commit 8520bc3 into develop Jan 25, 2019

5 checks passed

ci/circleci: sytestpy2merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgresmerged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3postgresmerged Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment