Repository navigation
fixes req.URL.Path for unix: sockets - #699
Conversation
|
Hey, nice work! I didn't think about that, so I'm glad you're fixing it. The PR looks good. As far as whether it should go before or after the 'without' logic, try writing a test. Once this PR has a test we can be confident it is working as expected. The test can try a couple different scenarios (e.g. with 'without' logic and without 'without' logic -- phew, that was weird!) and if it passes we can merge it in! 👍 Happy Easter, by the way. Hope you can sleep better tonight 😄 (Also, the failing test on travis is unrelated. There's a bug on Go tip.) |
|
Ahoy! I've been able to make quite a mess, using parts of my previous attempts at writing a test for the socket functionality. This passes and covers my changes. 👍
|
|
@eiszfuchs I added a new test to the CI script this weekend that checks < name string
---
> name stringLine 368. I'll work on getting more useful output for that test, sorry! Tests look great at a glance! |
|
This is really weird, but I appreciate clean code. Will squash and add a HTTP proxy test as well later (even though this will double the test code added, which doesn't sound too bad actually). Wait. It's still failing on |
|
@eiszfuchs It's Anyway, your PR is now passing, so I will merge in as soon as you add a HTTP proxy test and squash commits. Then we'll make you a collaborator. 👍 (Also, I've updated the CI tests on master so that more useful output is shown when gofmt check fails.) |
|
Yes, I noticed it wouldn't fail with 1.6 (since that's installed on my machine, too). |
|
In that case, is it alright if I merge your PR now? Just squash your commits first. |
|
No, wait with that. That error has been in the code for a while and I'd feel more comfortable with that additional test before merging that into |
|
Okay, I'll wait. 😄 Just wanted to avoid possible merge conflicts. Thanks for being careful! |
|
I have been rebasing before, I think I'll be able to do that magic trick again. 👍 |
|
Ahoy! I made it!
|
| } | ||
|
|
||
| func TestUnixSocketProxyPaths(t *testing.T) { | ||
| if runtime.GOOS == "windows" { |
There was a problem hiding this comment.
Oh wait! This only needs to happen for the socket test in line 336, doesn't it?
|
Uhm, yes, made changes according to comments. It's getting late and I'm getting nervous. 😥 Looks like I've got only lint messages left to fix, or am I to remove lints and improve code style later? |
|
@eiszfuchs If you want to fix the lint warnings, that'd be superb. (Unfortunately there's nothing we can do about the first two.) Then I think we're good to go! (don't forget to squash) PS. You're doing great. 😄 |
|
Will eat something, then sure, I love |
|
Lint warnings are gone! 🎉 |
|
Woo hoo! Excellent, thank you so much! Merging now. |
|
I've also added you as a collaborator, so feel free to participate in code reviews of other PRs, or submit others as you would like, you can even merge PRs if everything looks good (commits squashed, CI tests pass, etc)! |
|
Oh! Thanks! That's quite an honor! |
Please review my change like last time; I haven't been able to achieve master skills of Go yet.
What's currently going wrong
Given a Caddyfile like this:
And running an application similar to this one:
When calling
http://127.0.0.1:2015/testnow, server replies withsocket response for /var/run/www.socket/test.What should happen
When calling
http://127.0.0.1:2015/testnow, server should reply withsocket response for /test.What I did
I added another block that behaves just like
withoutwould do, trimming the path of the socket file.I'm not sure at the moment whether to put it above or below
without, but I guess I've got it the wrong way around? I couldn't sleep this night. I didn't succeed with my switch yesterday because of several problems, one of which was exactly this issue.