Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

Add Windows support #364

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Add Windows support #364

merged 2 commits into from
Jul 15, 2021

Conversation

charlespwd
Copy link
Contributor

@charlespwd charlespwd changed the title feature/windows support Add Windows support Jul 14, 2021
@charlespwd charlespwd merged commit cca6789 into main Jul 15, 2021
@@ -99,7 +99,7 @@ def text_document_uri(params)
end

def path_from_uri(uri)
uri&.sub('file://', '')
uri&.sub('file://', '')&.sub('/c%3A', '')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you really want .chomp? Or are you expecting \r in the middle of the string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the c:/ that I'm stripping. Not sure that applies?

#
# Hours wasted: 8.
eol = Gem.win_platform? ? "\n" : "\r\n"
@out.write("Content-Length: #{response_body.bytesize}#{eol}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for clarity, I'd suggest breaking out the line termination from the http header name/value pair. also, any concern that the bytesize will be null? If so, I'd want to add a safety here. (I'm guessing not since the response_body is fully buffered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the response_body is a JSON.dump. I don't think that's possible unless you explicitly call send_response without arguments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants