Skip to content
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 #2645 (h/t @benaiah) #2679

Merged
merged 2 commits into from Feb 21, 2017
Merged

Fix #2645 (h/t @benaiah) #2679

merged 2 commits into from Feb 21, 2017

Conversation

@ralsina
Copy link
Member

ralsina commented Feb 21, 2017

No description provided.

@ralsina

This comment has been minimized.

Copy link
Member Author

ralsina commented Feb 21, 2017

@Benaiah I just adopted your fix, since it looked ok.

@@ -298,8 +298,12 @@ def serve_static(self, environ, start_response):
p_uri = urlparse(uri)
f_path = os.path.join(self.site.config['OUTPUT_FOLDER'], *[unquote(x) for x in p_uri.path.split('/')])

# mimetypes.guess_type can't handle query strings, so we need
# to strip the URI to only the path for mimetype guessing
stripped_uri = urlparse.urljoin(url, p_uri.path)

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Feb 21, 2017

Member

Where is url defined?

This comment has been minimized.

Copy link
@ralsina

ralsina Feb 21, 2017

Author Member

Sorry, brainfart, the right thing is to just use p_uri.path there. Pushed.

doh
@ralsina ralsina merged commit 200f023 into master Feb 21, 2017
3 of 5 checks passed
3 of 5 checks passed
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
codacy/pr Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ralsina ralsina deleted the fix-2645 branch Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.