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

chore: update to go1.20.8 #47

Merged
merged 5 commits into from
Oct 4, 2023
Merged

chore: update to go1.20.8 #47

merged 5 commits into from
Oct 4, 2023

Conversation

bassosimone
Copy link
Contributor

@bassosimone bassosimone commented Oct 4, 2023

This pull request updates ooni/oohttp to use go1.20.8.

This is the update check list:

  • update UPSTREAM, commit the change, and then
    run the ./tools/merge.bash script to merge from upstream;
  • make sure you synch ./internal/safefilepath with the
    ./src/internal/safefilepath of the Go release you're merging from;
  • solve the very-likely merge conflicts and ensure the original spirit of the
    patches
    still hold;
  • make sure the codebase does not assume *tls.Conn anywhere (git grep -n '\*tls\.Conn')
    and otherwise replace *tls.Conn with TLSConn;
  • make sure the codebase does not call tls.Client anywhere (git grep -n 'tls\.Client')
    and otherwise replace tls.Client with TLSClientFactory;
  • ensure go build -v ./... still works;
  • ensure go test -race ./... is still passing;
  • ensure stdlibwrapper.go copies all
    the Request and Response fields;
  • run go get -u -v ./... && go mod tidy;
  • commit the changes and push merged-main to gitub;
  • open a PR and merge it using a merge commit;
  • create a new working branch to update the examples;
  • ensure example/internal/utlsx/utlsx.go
    copies all the ConnectionState fields;
  • go to example, update each submodule and ensure
    go test -race ./... passes in each submodule;
  • open a PR and merge it using a merge commit.

neild and others added 5 commits August 14, 2023 21:56
…eaders

Historically, the Transport has silently truncated invalid
Host headers at the first '/' or ' ' character. CL 506996 changed
this behavior to reject invalid Host headers entirely.
Unfortunately, Docker appears to rely on the previous behavior.

When sending a HTTP/1 request with an invalid Host, send an empty
Host header. This is safer than truncation: If you care about the
Host, then you should get the one you set; if you don't care,
then an empty Host should be fine.

Continue to fully validate Host headers sent to a proxy,
since proxies generally can't productively forward requests
without a Host.

For #60374
Fixes #61431
Fixes #61826

Change-Id: If170c7dd860aa20eb58fe32990fc93af832742b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/511155
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Roland Shoemaker <[email protected]>
Run-TryBot: Damien Neil <[email protected]>
(cherry picked from commit b9153f6ef338baee5fe02a867c8fbc83a8b29dd1)
Reviewed-on: https://go-review.googlesource.com/c/go/+/518756
Auto-Submit: Dmitri Shuralyov <[email protected]>
Reviewed-by: Russ Cox <[email protected]>
Run-TryBot: Roland Shoemaker <[email protected]>
@bassosimone
Copy link
Contributor Author

bassosimone commented Oct 4, 2023

About the safefilepath package:

% diff -ru . ~/src/github.com/ooni/oohttp/internal/safefilepath
diff --color -ru ./path_test.go $HOME/src/github.com/ooni/oohttp/internal/safefilepath/path_test.go
--- ./path_test.go	2023-10-04 14:04:25
+++ $HOME/src/github.com/ooni/oohttp/internal/safefilepath/path_test.go	2023-10-04 14:10:07
@@ -5,11 +5,12 @@
 package safefilepath_test
 
 import (
-	"internal/safefilepath"
 	"os"
 	"path/filepath"
 	"runtime"
 	"testing"
+
+	"github.com/ooni/oohttp/internal/safefilepath"
 )
 
 type PathTest struct {

% pwd
$HOME/src/github.com/golang/go/src/internal/safefilepath

% git rev-parse HEAD
d5b851804329aa547dafa278a0c35dd62298d651

@bassosimone bassosimone merged commit dbb36a6 into main Oct 4, 2023
1 check passed
@bassosimone bassosimone deleted the merged-main branch October 4, 2023 12:13
@bassosimone bassosimone mentioned this pull request Oct 4, 2023
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants