@ttsc/win32-arm64 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/go/VERSION +2 -2
- package/bin/go/bin/go.exe +0 -0
- package/bin/go/bin/gofmt.exe +0 -0
- package/bin/go/lib/time/update.bash +2 -2
- package/bin/go/lib/time/zoneinfo.zip +0 -0
- package/bin/go/pkg/include/asm_ppc64x.h +0 -16
- package/bin/go/pkg/tool/windows_arm64/asm.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/cgo.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/compile.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/cover.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/fix.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/link.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/preprofile.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/vet.exe +0 -0
- package/bin/go/src/archive/tar/reader.go +2 -1
- package/bin/go/src/archive/zip/reader.go +5 -29
- package/bin/go/src/archive/zip/struct.go +5 -6
- package/bin/go/src/archive/zip/writer.go +120 -60
- package/bin/go/src/bufio/bufio.go +1 -1
- package/bin/go/src/bytes/buffer.go +3 -3
- package/bin/go/src/bytes/bytes.go +45 -25
- package/bin/go/src/compress/flate/deflate.go +512 -363
- package/bin/go/src/compress/flate/deflatefast.go +156 -262
- package/bin/go/src/compress/flate/dict_decoder.go +1 -4
- package/bin/go/src/compress/flate/huffman_bit_writer.go +673 -250
- package/bin/go/src/compress/flate/huffman_code.go +164 -92
- package/bin/go/src/compress/flate/level1.go +195 -0
- package/bin/go/src/compress/flate/level2.go +190 -0
- package/bin/go/src/compress/flate/level3.go +228 -0
- package/bin/go/src/compress/flate/level4.go +200 -0
- package/bin/go/src/compress/flate/level5.go +287 -0
- package/bin/go/src/compress/flate/level6.go +297 -0
- package/bin/go/src/compress/flate/load_store.go +43 -0
- package/bin/go/src/compress/flate/regmask_amd64.go +9 -0
- package/bin/go/src/compress/flate/regmask_other.go +11 -0
- package/bin/go/src/compress/flate/token.go +238 -26
- package/bin/go/src/compress/gzip/gzip.go +8 -0
- package/bin/go/src/compress/zlib/writer.go +12 -0
- package/bin/go/src/context/context.go +6 -5
- package/bin/go/src/crypto/cipher/gcm.go +0 -4
- package/bin/go/src/crypto/crypto.go +27 -4
- package/bin/go/src/crypto/des/const.go +1 -1
- package/bin/go/src/crypto/ecdsa/ecdsa.go +21 -4
- package/bin/go/src/crypto/ed25519/ed25519.go +13 -0
- package/bin/go/src/crypto/internal/boring/aes.go +2 -3
- package/bin/go/src/crypto/internal/cryptotest/aead.go +53 -0
- package/bin/go/src/crypto/internal/cryptotest/boundary.go +34 -0
- package/bin/go/src/crypto/internal/cryptotest/boundary_compat.go +16 -0
- package/bin/go/src/crypto/internal/cryptotest/fetchmodule.go +9 -3
- package/bin/go/src/crypto/internal/cryptotest/fips140.go +62 -3
- package/bin/go/src/crypto/internal/cryptotest/hash.go +14 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/go.mod +19 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/go.sum +27 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/schema_gen.go +151 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/schema.go +9792 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/schemaversion.go +11 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/wycheproof.go +165 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/go.mod +14 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/go.sum +25 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/schema_gen.go +125 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/schema.go +591 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/schemaversion.go +14 -0
- package/bin/go/src/crypto/internal/fips140/aes/_asm/ctr/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/aes/_asm/standard/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/gcm_amd64_asm.go +36 -32
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/go.mod +5 -5
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/go.sum +8 -6
- package/bin/go/src/crypto/internal/fips140/aes/gcm/gcm_amd64.s +29 -17
- package/bin/go/src/crypto/internal/fips140/aes/gcm/gcm_arm64.s +73 -72
- package/bin/go/src/crypto/internal/fips140/aes/gcm/ghash.go +140 -124
- package/bin/go/src/crypto/internal/fips140/bigmod/nat.go +18 -0
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_loong64.s +23 -0
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_none.go +1 -1
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_stub.go +1 -1
- package/bin/go/src/crypto/internal/fips140/drbg/rand.go +12 -4
- package/bin/go/src/crypto/internal/fips140/ecdsa/ecdsa.go +17 -10
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/_asm/fe_amd64_asm.go +0 -90
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe.go +64 -97
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64.go +0 -5
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64.s +0 -167
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64_noasm.go +0 -2
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_generic.go +57 -1
- package/bin/go/src/crypto/internal/fips140/edwards25519/scalarmult.go +3 -2
- package/bin/go/src/crypto/internal/fips140/mldsa/mldsa.go +31 -25
- package/bin/go/src/crypto/internal/fips140/mldsa/semiexpanded.go +2 -2
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/go.mod +4 -4
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/go.sum +6 -0
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/p256_asm.go +1 -613
- package/bin/go/src/crypto/internal/fips140/nistec/p256.go +2 -2
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm.go +7 -6
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm_amd64.s +0 -503
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm_arm64.s +4 -429
- package/bin/go/src/crypto/internal/fips140/nistec/p256_ordinv.go +511 -47
- package/bin/go/src/crypto/internal/fips140/pbkdf2/pbkdf2.go +1 -1
- package/bin/go/src/crypto/internal/fips140/rsa/keygen.go +48 -46
- package/bin/go/src/crypto/internal/fips140/rsa/largeexponent.go +365 -0
- package/bin/go/src/crypto/internal/fips140/rsa/pkcs1v15.go +27 -0
- package/bin/go/src/crypto/internal/fips140/sha256/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/sha3/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/sha512/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/constant_time.go +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/xor_asm.go +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/xor_riscv64.go +18 -0
- package/bin/go/src/crypto/internal/fips140/subtle/xor_riscv64.s +33 -2
- package/bin/go/src/crypto/internal/fips140deps/cpu/cpu.go +2 -0
- package/bin/go/src/crypto/internal/fips140deps/time/time.go +7 -4
- package/bin/go/src/crypto/internal/fips140only/fips140only.go +0 -7
- package/bin/go/src/crypto/internal/fips140only/random_fips140v1.0.go +17 -0
- package/bin/go/src/crypto/internal/fips140only/random_fips140v1.28.go +16 -0
- package/bin/go/src/crypto/internal/fips140test/acvp_capabilities_fips140v1.28.json +86 -0
- package/bin/go/src/crypto/internal/fips140test/acvp_test_fips140v1.28.config.json +58 -0
- package/bin/go/src/crypto/internal/rand/rand.go +14 -14
- package/bin/go/src/crypto/internal/rand/random_fips140v1.0.go +20 -0
- package/bin/go/src/crypto/internal/rand/random_fips140v1.28.go +19 -0
- package/bin/go/src/crypto/mldsa/mldsa.go +97 -0
- package/bin/go/src/crypto/mldsa/mldsa_fips140v1.0.go +116 -0
- package/bin/go/src/crypto/mldsa/mldsa_fips140v1.26.go +226 -0
- package/bin/go/src/crypto/mlkem/mlkem.go +8 -2
- package/bin/go/src/crypto/rsa/fips.go +26 -8
- package/bin/go/src/crypto/rsa/pkcs1v15.go +2 -2
- package/bin/go/src/crypto/rsa/rsa.go +25 -2
- package/bin/go/src/crypto/sha1/sha1block_decl.go +1 -1
- package/bin/go/src/crypto/sha1/sha1block_generic.go +1 -1
- package/bin/go/src/crypto/sha1/sha1block_loong64.s +24 -8
- package/bin/go/src/crypto/sha1/sha1block_riscv64.s +225 -0
- package/bin/go/src/crypto/sha3/sha3.go +3 -2
- package/bin/go/src/crypto/tls/alert.go +2 -0
- package/bin/go/src/crypto/tls/auth.go +31 -0
- package/bin/go/src/crypto/tls/bogo_config.json +12 -23
- package/bin/go/src/crypto/tls/cipher_suites.go +3 -11
- package/bin/go/src/crypto/tls/common.go +106 -59
- package/bin/go/src/crypto/tls/common_string.go +18 -5
- package/bin/go/src/crypto/tls/conn.go +33 -35
- package/bin/go/src/crypto/tls/defaults.go +26 -20
- package/bin/go/src/crypto/tls/defaults_fips140.go +9 -0
- package/bin/go/src/crypto/tls/ech.go +9 -4
- package/bin/go/src/crypto/tls/generate_cert.go +8 -2
- package/bin/go/src/crypto/tls/handshake_client.go +17 -17
- package/bin/go/src/crypto/tls/handshake_client_tls13.go +8 -3
- package/bin/go/src/crypto/tls/handshake_server.go +26 -19
- package/bin/go/src/crypto/tls/handshake_server_tls13.go +8 -5
- package/bin/go/src/crypto/tls/key_agreement.go +5 -1
- package/bin/go/src/crypto/tls/key_schedule.go +42 -17
- package/bin/go/src/crypto/tls/prf.go +1 -1
- package/bin/go/src/crypto/tls/quic.go +6 -7
- package/bin/go/src/crypto/tls/tls.go +25 -29
- package/bin/go/src/crypto/x509/cert_pool.go +8 -4
- package/bin/go/src/crypto/x509/constraints.go +5 -0
- package/bin/go/src/crypto/x509/parser.go +101 -15
- package/bin/go/src/crypto/x509/pkcs8.go +45 -4
- package/bin/go/src/crypto/x509/pkix/pkix.go +33 -9
- package/bin/go/src/crypto/x509/root.go +113 -0
- package/bin/go/src/crypto/x509/root_darwin.go +8 -4
- package/bin/go/src/crypto/x509/root_plan9.go +2 -23
- package/bin/go/src/crypto/x509/root_unix.go +0 -97
- package/bin/go/src/crypto/x509/root_windows.go +8 -3
- package/bin/go/src/crypto/x509/verify.go +43 -4
- package/bin/go/src/crypto/x509/x509.go +169 -30
- package/bin/go/src/database/sql/closemu.go +119 -0
- package/bin/go/src/database/sql/convert.go +63 -4
- package/bin/go/src/database/sql/driver/driver.go +26 -0
- package/bin/go/src/database/sql/driver/types.go +4 -0
- package/bin/go/src/database/sql/internal/sql.go +22 -0
- package/bin/go/src/database/sql/sql.go +89 -40
- package/bin/go/src/debug/buildinfo/buildinfo.go +0 -13
- package/bin/go/src/debug/dwarf/buf.go +7 -1
- package/bin/go/src/debug/dwarf/class_string.go +3 -2
- package/bin/go/src/debug/elf/file.go +80 -50
- package/bin/go/src/debug/elf/reader.go +1 -1
- package/bin/go/src/debug/gosym/symtab.go +26 -30
- package/bin/go/src/debug/macho/file.go +2 -2
- package/bin/go/src/debug/macho/reloctype_string.go +12 -8
- package/bin/go/src/debug/pe/file.go +6 -3
- package/bin/go/src/encoding/base32/base32.go +29 -31
- package/bin/go/src/encoding/base64/base64.go +24 -29
- package/bin/go/src/encoding/gob/decode.go +7 -1
- package/bin/go/src/encoding/gob/type.go +6 -6
- package/bin/go/src/encoding/hex/hex.go +6 -6
- package/bin/go/src/encoding/json/decode.go +4 -3
- package/bin/go/src/encoding/json/encode.go +1 -2
- package/bin/go/src/encoding/json/fold.go +1 -1
- package/bin/go/src/encoding/json/internal/internal.go +11 -1
- package/bin/go/src/encoding/json/internal/jsonflags/flags.go +17 -9
- package/bin/go/src/encoding/json/internal/jsonopts/options.go +52 -37
- package/bin/go/src/encoding/json/internal/jsonopts/options_format.go +124 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/canada_geometry.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/citm_catalog.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/golang_source.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/string_escaped.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/string_unicode.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/synthea_fhir.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/twitter_status.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/testdata.go +10 -4
- package/bin/go/src/encoding/json/internal/jsonwire/decode.go +13 -36
- package/bin/go/src/encoding/json/internal/jsonwire/encode.go +7 -7
- package/bin/go/src/encoding/json/internal/jsonwire/wire.go +30 -38
- package/bin/go/src/encoding/json/jsontext/decode.go +49 -14
- package/bin/go/src/encoding/json/jsontext/doc.go +6 -11
- package/bin/go/src/encoding/json/jsontext/encode.go +55 -39
- package/bin/go/src/encoding/json/jsontext/errors.go +34 -3
- package/bin/go/src/encoding/json/jsontext/export.go +14 -0
- package/bin/go/src/encoding/json/jsontext/options.go +8 -8
- package/bin/go/src/encoding/json/jsontext/quote.go +2 -2
- package/bin/go/src/encoding/json/jsontext/state.go +14 -14
- package/bin/go/src/encoding/json/jsontext/token.go +246 -101
- package/bin/go/src/encoding/json/jsontext/value.go +31 -16
- package/bin/go/src/encoding/json/stream.go +14 -2
- package/bin/go/src/encoding/json/v2/arshal.go +100 -114
- package/bin/go/src/encoding/json/v2/arshal_any.go +6 -5
- package/bin/go/src/encoding/json/v2/arshal_default.go +292 -189
- package/bin/go/src/encoding/json/v2/{arshal_inlined.go → arshal_embedded.go} +14 -14
- package/bin/go/src/encoding/json/v2/arshal_funcs.go +28 -47
- package/bin/go/src/encoding/json/v2/arshal_methods.go +98 -29
- package/bin/go/src/encoding/json/v2/arshal_time.go +33 -13
- package/bin/go/src/encoding/json/v2/doc.go +40 -55
- package/bin/go/src/encoding/json/v2/errors.go +29 -9
- package/bin/go/src/encoding/json/v2/fields.go +83 -81
- package/bin/go/src/encoding/json/v2/intern.go +2 -2
- package/bin/go/src/encoding/json/v2/options.go +57 -41
- package/bin/go/src/encoding/json/v2_decode.go +21 -9
- package/bin/go/src/encoding/json/v2_encode.go +21 -10
- package/bin/go/src/encoding/json/v2_indent.go +2 -0
- package/bin/go/src/encoding/json/v2_inject.go +7 -4
- package/bin/go/src/encoding/json/v2_options.go +37 -30
- package/bin/go/src/encoding/json/v2_scanner.go +6 -1
- package/bin/go/src/encoding/json/v2_stream.go +49 -14
- package/bin/go/src/encoding/pem/pem.go +6 -2
- package/bin/go/src/fmt/doc.go +11 -1
- package/bin/go/src/fmt/print.go +69 -82
- package/bin/go/src/go/ast/ast.go +4 -4
- package/bin/go/src/go/ast/filter.go +1 -1
- package/bin/go/src/go/ast/scope.go +2 -2
- package/bin/go/src/go/build/build.go +1 -1
- package/bin/go/src/go/build/constraint/vers.go +4 -1
- package/bin/go/src/go/build/read.go +2 -2
- package/bin/go/src/go/constant/kind_string.go +3 -2
- package/bin/go/src/go/constant/value.go +26 -4
- package/bin/go/src/go/doc/comment/std.go +1 -0
- package/bin/go/src/go/importer/importer.go +4 -3
- package/bin/go/src/go/internal/gccgoimporter/parser.go +2 -0
- package/bin/go/src/go/internal/gcimporter/ureader.go +141 -56
- package/bin/go/src/go/parser/parser.go +11 -22
- package/bin/go/src/go/printer/math.go +28 -0
- package/bin/go/src/go/printer/nodes.go +28 -11
- package/bin/go/src/go/printer/printer.go +3 -1
- package/bin/go/src/go/scanner/errors.go +2 -0
- package/bin/go/src/go/scanner/scanner.go +40 -28
- package/bin/go/src/go/token/position.go +7 -16
- package/bin/go/src/go/types/alias.go +0 -18
- package/bin/go/src/go/types/api.go +4 -10
- package/bin/go/src/go/types/api_predicates.go +2 -2
- package/bin/go/src/go/types/assignments.go +44 -38
- package/bin/go/src/go/types/builtins.go +199 -168
- package/bin/go/src/go/types/call.go +155 -138
- package/bin/go/src/go/types/check.go +0 -83
- package/bin/go/src/go/types/const.go +22 -10
- package/bin/go/src/go/types/conversions.go +19 -19
- package/bin/go/src/go/types/cycles.go +29 -42
- package/bin/go/src/go/types/decl.go +33 -81
- package/bin/go/src/go/types/expr.go +191 -183
- package/bin/go/src/go/types/gotype.go +1 -0
- package/bin/go/src/go/types/hash.go +309 -0
- package/bin/go/src/go/types/index.go +91 -61
- package/bin/go/src/go/types/infer.go +11 -11
- package/bin/go/src/go/types/instantiate.go +27 -15
- package/bin/go/src/go/types/interface.go +2 -2
- package/bin/go/src/go/types/literals.go +56 -32
- package/bin/go/src/go/types/lookup.go +31 -14
- package/bin/go/src/go/types/named.go +58 -54
- package/bin/go/src/go/types/object.go +4 -3
- package/bin/go/src/go/types/operand.go +50 -34
- package/bin/go/src/go/types/range.go +19 -16
- package/bin/go/src/go/types/recording.go +24 -7
- package/bin/go/src/go/types/resolver.go +16 -18
- package/bin/go/src/go/types/scope.go +1 -15
- package/bin/go/src/go/types/selection.go +3 -1
- package/bin/go/src/go/types/signature.go +10 -11
- package/bin/go/src/go/types/stmt.go +34 -28
- package/bin/go/src/go/types/subst.go +82 -5
- package/bin/go/src/go/types/trie.go +93 -0
- package/bin/go/src/go/types/typelists.go +28 -0
- package/bin/go/src/go/types/typestring.go +5 -9
- package/bin/go/src/go/types/typexpr.go +17 -28
- package/bin/go/src/go/types/unify.go +12 -3
- package/bin/go/src/go/types/universe.go +12 -40
- package/bin/go/src/go/types/version.go +4 -0
- package/bin/go/src/go.mod +5 -5
- package/bin/go/src/go.sum +8 -8
- package/bin/go/src/hash/maphash/hasher.go +139 -0
- package/bin/go/src/hash/maphash/maphash.go +59 -4
- package/bin/go/src/html/template/attr_string.go +3 -2
- package/bin/go/src/html/template/delim_string.go +3 -2
- package/bin/go/src/html/template/element_string.go +3 -2
- package/bin/go/src/html/template/jsctx_string.go +3 -2
- package/bin/go/src/html/template/state_string.go +3 -2
- package/bin/go/src/html/template/template.go +7 -4
- package/bin/go/src/html/template/transition.go +1 -1
- package/bin/go/src/html/template/urlpart_string.go +3 -2
- package/bin/go/src/image/format.go +9 -0
- package/bin/go/src/image/gif/reader.go +18 -0
- package/bin/go/src/image/jpeg/huffman.go +22 -3
- package/bin/go/src/image/jpeg/reader.go +54 -29
- package/bin/go/src/image/jpeg/scan.go +68 -38
- package/bin/go/src/image/png/writer.go +8 -0
- package/bin/go/src/index/suffixarray/suffixarray.go +14 -6
- package/bin/go/src/internal/abi/abi_generic.go +1 -1
- package/bin/go/src/internal/abi/abi_s390x.go +0 -2
- package/bin/go/src/internal/abi/compiletype.go +30 -0
- package/bin/go/src/internal/abi/iface.go +13 -1
- package/bin/go/src/internal/abi/map.go +21 -3
- package/bin/go/src/internal/abi/type.go +136 -27
- package/bin/go/src/internal/buildcfg/exp.go +8 -8
- package/bin/go/src/internal/buildcfg/zbootstrap.go +1 -1
- package/bin/go/src/internal/bytealg/bytealg.go +16 -16
- package/bin/go/src/internal/bytealg/compare_s390x.s +0 -24
- package/bin/go/src/internal/bytealg/equal_s390x.s +0 -18
- package/bin/go/src/internal/bytealg/indexbyte_arm64.s +28 -0
- package/bin/go/src/internal/bytealg/indexbyte_s390x.s +0 -33
- package/bin/go/src/internal/coverage/encodemeta/encode.go +1 -1
- package/bin/go/src/internal/cpu/cpu.go +22 -7
- package/bin/go/src/internal/cpu/cpu_arm64.go +8 -1
- package/bin/go/src/internal/cpu/cpu_arm64.s +7 -0
- package/bin/go/src/internal/cpu/cpu_arm64_darwin.go +2 -0
- package/bin/go/src/internal/cpu/cpu_arm64_freebsd.go +2 -1
- package/bin/go/src/internal/cpu/cpu_arm64_hwcap.go +2 -0
- package/bin/go/src/internal/cpu/cpu_arm64_openbsd.go +6 -1
- package/bin/go/src/internal/cpu/cpu_arm64_other.go +1 -1
- package/bin/go/src/internal/cpu/cpu_arm64_windows.go +26 -0
- package/bin/go/src/internal/cpu/cpu_loong64.go +14 -2
- package/bin/go/src/internal/cpu/cpu_riscv64.go +10 -0
- package/bin/go/src/internal/cpu/cpu_riscv64_linux.go +21 -0
- package/bin/go/src/internal/cpu/cpu_windows.go +20 -0
- package/bin/go/src/internal/cpu/cpu_x86.go +2 -0
- package/bin/go/src/internal/filepathlite/path_windows.go +30 -17
- package/bin/go/src/internal/fuzz/fuzz.go +5 -1
- package/bin/go/src/internal/fuzz/mutator.go +2 -2
- package/bin/go/src/internal/fuzz/worker.go +1 -1
- package/bin/go/src/internal/gate/gate.go +76 -0
- package/bin/go/src/internal/godebugs/table.go +29 -10
- package/bin/go/src/internal/goexperiment/exp_mapsplitgroup_off.go +8 -0
- package/bin/go/src/internal/goexperiment/exp_mapsplitgroup_on.go +8 -0
- package/bin/go/src/internal/goexperiment/flags.go +5 -3
- package/bin/go/src/internal/goversion/goversion.go +1 -1
- package/bin/go/src/internal/lazyregexp/lazyre.go +4 -0
- package/bin/go/src/internal/nettest/conn.go +437 -0
- package/bin/go/src/internal/nettest/listener.go +148 -0
- package/bin/go/src/internal/nettest/packetconn.go +250 -0
- package/bin/go/src/internal/nettest/queue.go +33 -0
- package/bin/go/src/internal/pkgbits/syncmarker_string.go +4 -4
- package/bin/go/src/internal/pkgbits/version.go +27 -1
- package/bin/go/src/internal/platform/supported.go +8 -10
- package/bin/go/src/internal/platform/zosarch.go +1 -3
- package/bin/go/src/internal/poll/fd_mutex.go +49 -10
- package/bin/go/src/internal/poll/fd_unix.go +6 -1
- package/bin/go/src/internal/poll/fd_windows.go +175 -191
- package/bin/go/src/internal/poll/fd_writev_libc.go +1 -1
- package/bin/go/src/internal/poll/fd_writev_unix.go +1 -1
- package/bin/go/src/internal/poll/file_plan9.go +4 -4
- package/bin/go/src/internal/poll/sendfile_windows.go +1 -3
- package/bin/go/src/internal/poll/splice_linux.go +1 -1
- package/bin/go/src/internal/profile/encode.go +1 -1
- package/bin/go/src/internal/profile/profile.go +5 -3
- package/bin/go/src/internal/profilerecord/profilerecord.go +2 -2
- package/bin/go/src/internal/reflectlite/value.go +1 -15
- package/bin/go/src/internal/runtime/atomic/atomic_386.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_amd64.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_andor_generic.go +0 -11
- package/bin/go/src/internal/runtime/atomic/atomic_arm.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_loong64.go +2 -2
- package/bin/go/src/internal/runtime/atomic/atomic_loong64.s +22 -11
- package/bin/go/src/internal/runtime/atomic/atomic_mipsx.go +0 -10
- package/bin/go/src/internal/runtime/atomic/atomic_riscv64.s +4 -4
- package/bin/go/src/internal/runtime/atomic/atomic_s390x.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_wasm.go +0 -31
- package/bin/go/src/internal/runtime/atomic/linkname.go +34 -0
- package/bin/go/src/internal/runtime/exithook/hooks.go +0 -4
- package/bin/go/src/internal/runtime/gc/scan/expand_amd64.s +2285 -2285
- package/bin/go/src/internal/runtime/gc/scan/mkasm.go +1 -1
- package/bin/go/src/internal/runtime/gc/scan/scan_amd64.go +2 -1
- package/bin/go/src/internal/runtime/gc/scan/scan_amd64.s +4 -2
- package/bin/go/src/internal/runtime/maps/group.go +22 -13
- package/bin/go/src/internal/runtime/maps/map.go +35 -14
- package/bin/go/src/internal/runtime/maps/memhash_386.s +408 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes.go +38 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes_asm.go +24 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes_simd.go +49 -0
- package/bin/go/src/internal/runtime/maps/memhash_align_check.go +10 -0
- package/bin/go/src/internal/runtime/maps/memhash_align_nocheck.go +16 -0
- package/bin/go/src/internal/runtime/maps/memhash_amd64.s +426 -0
- package/bin/go/src/internal/runtime/maps/memhash_arm64.s +366 -0
- package/bin/go/src/internal/runtime/maps/memhash_noaes.go +43 -0
- package/bin/go/src/internal/runtime/maps/memhash_nosimd_amd64.s +33 -0
- package/bin/go/src/internal/runtime/maps/runtime.go +37 -88
- package/bin/go/src/internal/runtime/maps/runtime_alg.go +93 -0
- package/bin/go/src/internal/runtime/maps/runtime_fast32.go +111 -97
- package/bin/go/src/internal/runtime/maps/runtime_fast64.go +137 -98
- package/bin/go/src/internal/runtime/maps/runtime_faststr.go +96 -89
- package/bin/go/src/{runtime/hash32.go → internal/runtime/maps/runtime_hash32.go} +8 -10
- package/bin/go/src/{runtime/hash64.go → internal/runtime/maps/runtime_hash64.go} +8 -8
- package/bin/go/src/internal/runtime/maps/table.go +66 -3
- package/bin/go/src/internal/runtime/math/math.go +0 -21
- package/bin/go/src/internal/runtime/startlinetest/func_amd64.s +2 -1
- package/bin/go/src/internal/runtime/sys/dit_arm64.go +3 -0
- package/bin/go/src/internal/runtime/sys/dit_arm64.s +16 -3
- package/bin/go/src/internal/runtime/syscall/linux/asm_linux_s390x.s +0 -23
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_386.s +7 -4
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_amd64.s +10 -8
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_arm64.s +0 -1
- package/bin/go/src/internal/runtime/syscall/windows/defs_windows.go +4 -0
- package/bin/go/src/internal/runtime/syscall/windows/syscall_windows.go +7 -9
- package/bin/go/src/internal/strconv/atof.go +69 -42
- package/bin/go/src/internal/strconv/atoi.go +1 -0
- package/bin/go/src/internal/strconv/ftoa.go +329 -357
- package/bin/go/src/internal/strconv/itoa.go +53 -59
- package/bin/go/src/internal/strconv/pow10gen.go +15 -3
- package/bin/go/src/internal/strconv/pow10tab.go +670 -670
- package/bin/go/src/internal/strconv/uscale.go +290 -0
- package/bin/go/src/internal/stringslite/strings.go +14 -42
- package/bin/go/src/internal/syscall/unix/asm_openbsd.s +0 -2
- package/bin/go/src/internal/syscall/unix/at.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_fstatat.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_libc2.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_openbsd.go +0 -2
- package/bin/go/src/internal/syscall/unix/faccessat_bsd.go +1 -1
- package/bin/go/src/internal/syscall/unix/faccessat_openbsd.go +0 -2
- package/bin/go/src/internal/syscall/windows/at_windows.go +5 -5
- package/bin/go/src/internal/syscall/windows/net_windows.go +1 -0
- package/bin/go/src/internal/syscall/windows/string_windows.go +6 -3
- package/bin/go/src/internal/syscall/windows/syscall_windows.go +2 -0
- package/bin/go/src/internal/syscall/windows/types_windows.go +89 -4
- package/bin/go/src/internal/syscall/windows/zsyscall_windows.go +7 -0
- package/bin/go/src/internal/testenv/testenv.go +24 -1
- package/bin/go/src/internal/trace/event.go +1 -1
- package/bin/go/src/internal/trace/tracev2/events.go +2 -0
- package/bin/go/src/internal/trace/traceviewer/pprof.go +1 -0
- package/bin/go/src/internal/types/errors/generrordocs.go +1 -1
- package/bin/go/src/io/fs/fs.go +4 -1
- package/bin/go/src/io/fs/glob.go +1 -1
- package/bin/go/src/io/fs/readdir.go +3 -3
- package/bin/go/src/io/fs/readfile.go +3 -3
- package/bin/go/src/io/fs/stat.go +1 -1
- package/bin/go/src/io/fs/sub.go +4 -2
- package/bin/go/src/iter/iter.go +2 -2
- package/bin/go/src/log/slog/handler.go +0 -1
- package/bin/go/src/log/slog/json_handler.go +7 -1
- package/bin/go/src/log/slog/logger.go +16 -0
- package/bin/go/src/log/slog/text_handler.go +10 -1
- package/bin/go/src/log/slog/value.go +1 -1
- package/bin/go/src/log/syslog/doc.go +5 -0
- package/bin/go/src/math/abs.go +1 -1
- package/bin/go/src/math/big/accuracy_string.go +4 -4
- package/bin/go/src/math/big/arith.go +1 -1
- package/bin/go/src/math/big/arith_loong64.s +2 -4
- package/bin/go/src/math/big/float.go +2 -0
- package/bin/go/src/math/big/ftoa.go +11 -5
- package/bin/go/src/math/big/int.go +84 -1
- package/bin/go/src/math/big/intconv.go +19 -4
- package/bin/go/src/math/big/internal/asmgen/loong64.go +2 -0
- package/bin/go/src/math/big/nat.go +68 -17
- package/bin/go/src/math/big/natdiv.go +8 -5
- package/bin/go/src/math/big/roundingmode_string.go +3 -2
- package/bin/go/src/math/copysign.go +1 -2
- package/bin/go/src/math/exp2_asm.go +1 -1
- package/bin/go/src/math/exp2_noasm.go +1 -1
- package/bin/go/src/math/exp_asm.go +1 -1
- package/bin/go/src/math/exp_loong64.s +4 -12
- package/bin/go/src/math/exp_noasm.go +1 -1
- package/bin/go/src/math/exp_riscv64.s +236 -0
- package/bin/go/src/math/nextafter.go +4 -2
- package/bin/go/src/math/pow10.go +1 -1
- package/bin/go/src/math/rand/v2/rand.go +14 -4
- package/bin/go/src/mime/type.go +3 -2
- package/bin/go/src/net/dial.go +10 -6
- package/bin/go/src/net/dnsclient_unix.go +37 -8
- package/bin/go/src/net/dnsconfig.go +6 -0
- package/bin/go/src/net/fd_plan9.go +13 -6
- package/bin/go/src/net/fd_unix.go +3 -7
- package/bin/go/src/net/fd_windows.go +4 -9
- package/bin/go/src/net/file_plan9.go +1 -1
- package/bin/go/src/net/file_posix.go +1 -5
- package/bin/go/src/net/http/client.go +21 -4
- package/bin/go/src/net/http/clientconn.go +20 -1
- package/bin/go/src/net/http/clone.go +1 -10
- package/bin/go/src/net/http/cookie.go +5 -6
- package/bin/go/src/net/http/cookiejar/jar.go +6 -4
- package/bin/go/src/net/http/fcgi/fcgi.go +1 -2
- package/bin/go/src/net/http/fs.go +8 -1
- package/bin/go/src/net/http/http.go +29 -12
- package/bin/go/src/net/http/http2.go +561 -0
- package/bin/go/src/net/http/httptest/server.go +305 -60
- package/bin/go/src/net/http/httptrace/trace.go +78 -27
- package/bin/go/src/net/http/httputil/reverseproxy.go +0 -30
- package/bin/go/src/net/http/internal/common.go +14 -0
- package/bin/go/src/net/http/internal/http2/api.go +161 -0
- package/bin/go/src/net/http/internal/http2/ascii.go +53 -0
- package/bin/go/src/net/http/internal/http2/ciphers.go +641 -0
- package/bin/go/src/net/http/internal/http2/client_conn_pool.go +285 -0
- package/bin/go/src/net/http/internal/http2/config.go +118 -0
- package/bin/go/src/net/http/internal/http2/databuffer.go +146 -0
- package/bin/go/src/net/http/internal/http2/errors.go +173 -0
- package/bin/go/src/net/http/internal/http2/flow.go +175 -0
- package/bin/go/src/net/http/internal/http2/frame.go +1905 -0
- package/bin/go/src/net/http/internal/http2/gotrack.go +181 -0
- package/bin/go/src/net/http/internal/http2/http2.go +403 -0
- package/bin/go/src/net/http/internal/http2/pipe.go +184 -0
- package/bin/go/src/net/http/internal/http2/server.go +3238 -0
- package/bin/go/src/net/http/internal/http2/transport.go +3267 -0
- package/bin/go/src/net/http/internal/http2/write.go +380 -0
- package/bin/go/src/net/http/internal/http2/writesched.go +289 -0
- package/bin/go/src/net/http/internal/http2/writesched_priority_rfc9218.go +224 -0
- package/bin/go/src/net/http/internal/http2/writesched_roundrobin.go +119 -0
- package/bin/go/src/net/http/internal/httpcommon/httpcommon.go +8 -0
- package/bin/go/src/net/http/internal/httpsfv/httpsfv.go +666 -0
- package/bin/go/src/net/http/internal/sniff.go +304 -0
- package/bin/go/src/net/http/omithttp2.go +28 -49
- package/bin/go/src/net/http/pprof/pprof.go +11 -17
- package/bin/go/src/net/http/request.go +30 -3
- package/bin/go/src/net/http/response.go +6 -2
- package/bin/go/src/net/http/server.go +366 -144
- package/bin/go/src/net/http/sniff.go +2 -289
- package/bin/go/src/net/http/transfer.go +64 -21
- package/bin/go/src/net/http/transport.go +288 -83
- package/bin/go/src/net/ip.go +4 -0
- package/bin/go/src/net/ipsock_plan9.go +4 -4
- package/bin/go/src/net/ipsock_posix.go +8 -2
- package/bin/go/src/net/lookup.go +10 -0
- package/bin/go/src/net/lookup_windows.go +1 -1
- package/bin/go/src/net/mail/message.go +8 -3
- package/bin/go/src/net/net.go +2 -0
- package/bin/go/src/net/netip/netip.go +68 -61
- package/bin/go/src/net/sock_posix.go +1 -4
- package/bin/go/src/net/textproto/reader.go +11 -3
- package/bin/go/src/net/udpsock_plan9.go +2 -7
- package/bin/go/src/net/unixsock.go +11 -3
- package/bin/go/src/net/url/url.go +33 -0
- package/bin/go/src/os/dir_darwin.go +7 -0
- package/bin/go/src/os/exec/exec.go +16 -2
- package/bin/go/src/os/exec.go +1 -0
- package/bin/go/src/os/file.go +8 -1
- package/bin/go/src/os/root_windows.go +5 -1
- package/bin/go/src/os/signal/doc.go +3 -2
- package/bin/go/src/os/signal/signal.go +18 -6
- package/bin/go/src/os/statat_unix.go +5 -1
- package/bin/go/src/path/filepath/path.go +4 -0
- package/bin/go/src/reflect/asm_s390x.s +0 -10
- package/bin/go/src/reflect/iter.go +13 -13
- package/bin/go/src/reflect/makefunc.go +2 -1
- package/bin/go/src/reflect/map.go +61 -18
- package/bin/go/src/reflect/type.go +63 -46
- package/bin/go/src/reflect/value.go +59 -16
- package/bin/go/src/regexp/exec.go +5 -5
- package/bin/go/src/regexp/regexp.go +382 -319
- package/bin/go/src/regexp/syntax/parse.go +19 -10
- package/bin/go/src/runtime/HACKING.md +19 -0
- package/bin/go/src/runtime/_mkmalloc/constants.go +6 -4
- package/bin/go/src/runtime/_mkmalloc/go.mod +1 -1
- package/bin/go/src/runtime/_mkmalloc/mkmalloc.go +405 -64
- package/bin/go/src/runtime/alg.go +21 -53
- package/bin/go/src/runtime/asm_386.s +11 -461
- package/bin/go/src/runtime/asm_amd64.s +30 -537
- package/bin/go/src/runtime/asm_arm.s +4 -39
- package/bin/go/src/runtime/asm_arm64.s +15 -428
- package/bin/go/src/runtime/asm_loong64.s +37 -47
- package/bin/go/src/runtime/asm_mips64x.s +15 -15
- package/bin/go/src/runtime/asm_mipsx.s +0 -15
- package/bin/go/src/runtime/asm_ppc64x.h +0 -16
- package/bin/go/src/runtime/asm_ppc64x.s +13 -59
- package/bin/go/src/runtime/asm_riscv64.s +30 -91
- package/bin/go/src/runtime/asm_s390x.s +49 -49
- package/bin/go/src/runtime/asm_wasm.s +0 -15
- package/bin/go/src/runtime/atomic_riscv64.s +1 -1
- package/bin/go/src/runtime/cgo/abi_riscv64.h +72 -0
- package/bin/go/src/runtime/cgo/asm_riscv64.s +7 -48
- package/bin/go/src/runtime/cgo/callbacks.go +0 -42
- package/bin/go/src/runtime/cgo/callbacks_unix.go +58 -0
- package/bin/go/src/runtime/cgo/cgo.go +6 -3
- package/bin/go/src/runtime/cgo/gcc_aix_ppc64.S +21 -9
- package/bin/go/src/runtime/cgo/gcc_android.c +0 -26
- package/bin/go/src/runtime/cgo/gcc_clearenv.c +1 -1
- package/bin/go/src/runtime/cgo/gcc_fatalf.c +14 -3
- package/bin/go/src/runtime/cgo/{gcc_libinit.c → gcc_libinit_unix.c} +18 -65
- package/bin/go/src/runtime/cgo/gcc_libinit_windows.c +23 -35
- package/bin/go/src/runtime/cgo/gcc_linux_ppc64x.S +16 -7
- package/bin/go/src/runtime/cgo/gcc_netbsd.c +8 -56
- package/bin/go/src/runtime/cgo/gcc_s390x.S +13 -4
- package/bin/go/src/runtime/cgo/gcc_sigaction.c +1 -1
- package/bin/go/src/runtime/cgo/gcc_unix.c +63 -0
- package/bin/go/src/runtime/cgo/gcc_util.c +0 -19
- package/bin/go/src/runtime/cgo/handle.go +3 -0
- package/bin/go/src/runtime/cgo/libcgo.h +7 -10
- package/bin/go/src/runtime/cgo/libcgo_unix.h +2 -10
- package/bin/go/src/runtime/cgo/pthread_unix.c +138 -0
- package/bin/go/src/runtime/cgo/sigaction.go +1 -1
- package/bin/go/src/runtime/cgo/windows.go +18 -1
- package/bin/go/src/runtime/cgo_ppc64x.go +1 -1
- package/bin/go/src/runtime/cgo_sigaction.go +1 -1
- package/bin/go/src/runtime/cgocall.go +10 -2
- package/bin/go/src/runtime/chan.go +2 -16
- package/bin/go/src/runtime/coro.go +2 -2
- package/bin/go/src/runtime/cpuflags.go +4 -3
- package/bin/go/src/runtime/debug/garbage.go +6 -6
- package/bin/go/src/runtime/debug/mod.go +1 -1
- package/bin/go/src/runtime/debug/stack.go +1 -1
- package/bin/go/src/runtime/debugcall.go +0 -3
- package/bin/go/src/runtime/error.go +6 -0
- package/bin/go/src/runtime/extern.go +5 -3
- package/bin/go/src/runtime/heapdump.go +1 -1
- package/bin/go/src/runtime/iface.go +20 -10
- package/bin/go/src/runtime/libinit.go +48 -0
- package/bin/go/src/runtime/lock_js.go +4 -2
- package/bin/go/src/runtime/lock_spinbit.go +13 -12
- package/bin/go/src/runtime/lock_wasip1.go +4 -2
- package/bin/go/src/runtime/lockrank.go +24 -21
- package/bin/go/src/runtime/lockrank_off.go +5 -2
- package/bin/go/src/runtime/lockrank_on.go +8 -7
- package/bin/go/src/runtime/malloc.go +10 -26
- package/bin/go/src/runtime/malloc_generated.go +819 -8628
- package/bin/go/src/runtime/malloc_stubs.go +187 -197
- package/bin/go/src/runtime/malloc_tables_generated.go +16 -882
- package/bin/go/src/runtime/map.go +4 -4
- package/bin/go/src/runtime/mbitmap.go +3 -1
- package/bin/go/src/runtime/mem.go +2 -6
- package/bin/go/src/runtime/mem_sbrk.go +4 -0
- package/bin/go/src/runtime/memclr_s390x.s +0 -5
- package/bin/go/src/runtime/memmove_s390x.s +0 -7
- package/bin/go/src/runtime/metrics/doc.go +5 -29
- package/bin/go/src/runtime/metrics/sample.go +3 -0
- package/bin/go/src/runtime/metrics.go +3 -2
- package/bin/go/src/runtime/mgc.go +41 -25
- package/bin/go/src/runtime/mgcmark.go +5 -0
- package/bin/go/src/runtime/mgcmark_greenteagc.go +1 -1
- package/bin/go/src/runtime/mgcpacer.go +1 -3
- package/bin/go/src/runtime/mgcscavenge.go +1 -1
- package/bin/go/src/runtime/mheap.go +1 -10
- package/bin/go/src/runtime/mklockrank.go +6 -1
- package/bin/go/src/runtime/mkpreempt.go +7 -0
- package/bin/go/src/runtime/mprof.go +12 -23
- package/bin/go/src/runtime/os2_aix.go +3 -3
- package/bin/go/src/runtime/os3_solaris.go +10 -0
- package/bin/go/src/runtime/os_aix.go +9 -2
- package/bin/go/src/runtime/os_darwin.go +3 -8
- package/bin/go/src/runtime/os_dragonfly.go +10 -0
- package/bin/go/src/runtime/os_js.go +10 -0
- package/bin/go/src/runtime/os_linux32.go +19 -6
- package/bin/go/src/runtime/os_netbsd.go +10 -0
- package/bin/go/src/runtime/os_openbsd.go +10 -0
- package/bin/go/src/runtime/os_plan9.go +10 -0
- package/bin/go/src/runtime/os_wasip1.go +10 -0
- package/bin/go/src/runtime/os_windows.go +45 -12
- package/bin/go/src/runtime/os_workdir_ios_arm64.go +98 -0
- package/bin/go/src/runtime/os_workdir_stub.go +9 -0
- package/bin/go/src/runtime/panic.go +93 -8
- package/bin/go/src/runtime/plugin.go +1 -3
- package/bin/go/src/runtime/pprof/pprof.go +11 -14
- package/bin/go/src/runtime/pprof/protomem.go +8 -15
- package/bin/go/src/runtime/preempt_loong64.s +8 -4
- package/bin/go/src/runtime/preempt_noxreg.go +2 -0
- package/bin/go/src/runtime/preempt_xreg.go +29 -2
- package/bin/go/src/runtime/print.go +9 -1
- package/bin/go/src/runtime/proc.go +68 -17
- package/bin/go/src/runtime/race_riscv64.s +40 -83
- package/bin/go/src/runtime/race_s390x.s +0 -16
- package/bin/go/src/runtime/rand.go +40 -12
- package/bin/go/src/runtime/{rt0_linux_ppc64le.s → rt0_linux_ppc64x.s} +12 -2
- package/bin/go/src/runtime/runtime-gdb.py +13 -2
- package/bin/go/src/runtime/runtime1.go +69 -18
- package/bin/go/src/runtime/runtime2.go +23 -22
- package/bin/go/src/runtime/secret/secret.go +7 -2
- package/bin/go/src/runtime/secret.go +27 -9
- package/bin/go/src/runtime/secret_nosecret.go +1 -1
- package/bin/go/src/runtime/sigaction.go +1 -1
- package/bin/go/src/runtime/signal_unix.go +5 -3
- package/bin/go/src/runtime/softfloat64.go +7 -2
- package/bin/go/src/runtime/string.go +4 -1
- package/bin/go/src/runtime/stubs.go +14 -4
- package/bin/go/src/runtime/stubs_amd64.go +4 -0
- package/bin/go/src/runtime/stubs_arm.go +10 -1
- package/bin/go/src/runtime/stubs_arm64.go +13 -0
- package/bin/go/src/runtime/stubs_loong64.go +18 -0
- package/bin/go/src/runtime/stubs_mips64x.go +9 -0
- package/bin/go/src/runtime/stubs_mipsx.go +11 -0
- package/bin/go/src/runtime/stubs_ppc64x.go +15 -0
- package/bin/go/src/runtime/stubs_riscv64.go +13 -0
- package/bin/go/src/runtime/stubs_s390x.go +18 -0
- package/bin/go/src/runtime/symtab.go +15 -16
- package/bin/go/src/runtime/synctest.go +2 -4
- package/bin/go/src/runtime/sys_aix_ppc64.s +9 -0
- package/bin/go/src/runtime/sys_darwin.go +2 -20
- package/bin/go/src/runtime/sys_darwin_amd64.s +1 -4
- package/bin/go/src/runtime/sys_darwin_arm64.s +3 -6
- package/bin/go/src/runtime/sys_freebsd_riscv64.s +2 -2
- package/bin/go/src/runtime/sys_ios_arm64.go +151 -0
- package/bin/go/src/runtime/sys_ios_arm64.s +78 -0
- package/bin/go/src/runtime/sys_linux_amd64.s +7 -1
- package/bin/go/src/runtime/sys_linux_loong64.s +8 -14
- package/bin/go/src/runtime/sys_linux_ppc64x.s +0 -12
- package/bin/go/src/runtime/sys_linux_riscv64.s +2 -2
- package/bin/go/src/runtime/sys_openbsd.go +1 -1
- package/bin/go/src/runtime/sys_openbsd_riscv64.s +16 -16
- package/bin/go/src/runtime/syscall_windows.go +2 -6
- package/bin/go/src/runtime/time.go +19 -57
- package/bin/go/src/runtime/trace/subscribe.go +0 -3
- package/bin/go/src/runtime/traceback.go +90 -13
- package/bin/go/src/runtime/traceregion.go +3 -3
- package/bin/go/src/runtime/tracestring.go +5 -0
- package/bin/go/src/runtime/type.go +85 -15
- package/bin/go/src/runtime/utf8.go +2 -2
- package/bin/go/src/simd/archsimd/_gen/go.mod +2 -2
- package/bin/go/src/simd/archsimd/_gen/go.sum +2 -2
- package/bin/go/src/simd/archsimd/_gen/main.go +106 -15
- package/bin/go/src/simd/archsimd/_gen/midway/comments.yaml +151 -0
- package/bin/go/src/simd/archsimd/_gen/midway/intersect_simd_ops.go +836 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/asbits.go +139 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/compare_natural.go +73 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/formatted_files.go +66 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/insert_ordered_map.go +159 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/merge_generic_ops.go +245 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arch.go +173 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/emit.go +166 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/instruction.go +642 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/load.go +54 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/operands.go +406 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/etetest.sh +1 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdGenericOps.go +19 -52
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdIntrinsics.go +162 -98
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdMachineOps.go +50 -19
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdTypes.go +198 -140
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdrules.go +278 -57
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdssa.go +133 -68
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_utility.go +163 -30
- package/bin/go/src/simd/archsimd/_gen/simdgen/go_amd64.yaml +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/go_arm64.yaml +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/godefs.go +113 -15
- package/bin/go/src/simd/archsimd/_gen/simdgen/main.go +62 -17
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/categories.yaml +12 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/{go.yaml → go_amd64.yaml} +12 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/go_arm64.yaml +91 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/categories.yaml +11 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/go_arm64.yaml +43 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Compares/go_arm64.yaml +81 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/categories.yaml +11 -6
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/{go.yaml → go_amd64.yaml} +8 -8
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/go_arm64.yaml +358 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/categories.yaml +5 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/{go.yaml → go_amd64.yaml} +4 -4
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/go_arm64.yaml +52 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/categories.yaml +29 -11
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/{go.yaml → go_amd64.yaml} +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/go_arm64.yaml +10 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/categories.yaml +2 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/{go.yaml → go_amd64.yaml} +2 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/go_arm64.yaml +35 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/categories.yaml +5 -8
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/{go.yaml → go_amd64.yaml} +7 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/go_arm64.yaml +31 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MinMax/go_arm64.yaml +61 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/categories.yaml +79 -23
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/{go.yaml → go_amd64.yaml} +213 -104
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/go_arm64.yaml +264 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/categories.yaml +6 -2
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/{go.yaml → go_amd64.yaml} +3 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/go_arm64.yaml +38 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/NegAbs/categories.yaml +7 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/NegAbs/go_arm64.yaml +36 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/categories.yaml +5 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/go_arm64.yaml +19 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Reduce/categories.yaml +16 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Reduce/go_arm64.yaml +71 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/categories.yaml +156 -41
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go_amd64.yaml +299 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go_arm64.yaml +202 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/types.yaml +2 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/xed.go +44 -11
- package/bin/go/src/simd/archsimd/_gen/tmplgen/main.go +668 -123
- package/bin/go/src/simd/archsimd/_gen/unify/closure.go +1 -1
- package/bin/go/src/simd/archsimd/_gen/unify/env.go +35 -3
- package/bin/go/src/simd/archsimd/_gen/unify/yaml.go +4 -4
- package/bin/go/src/simd/archsimd/_gen/wasmgen/main.go +2064 -0
- package/bin/go/src/simd/archsimd/clmul_arm64.go +79 -0
- package/bin/go/src/simd/archsimd/clmul_emulated.go +103 -0
- package/bin/go/src/simd/archsimd/compare_gen_arm64.go +155 -0
- package/bin/go/src/simd/archsimd/cpu.go +1 -1
- package/bin/go/src/simd/archsimd/cpu_other.go +21 -0
- package/bin/go/src/simd/archsimd/doc.go +0 -2
- package/bin/go/src/simd/archsimd/dummy.s +1 -1
- package/bin/go/src/simd/archsimd/generate.go +1 -1
- package/bin/go/src/simd/archsimd/internal/test_helpers/checkslices.go +2 -2
- package/bin/go/src/simd/archsimd/maskmerge_gen_amd64.go +330 -0
- package/bin/go/src/simd/archsimd/maskmerge_gen_arm64.go +167 -0
- package/bin/go/src/simd/archsimd/ops_amd64.go +4210 -2475
- package/bin/go/src/simd/archsimd/ops_arm64.go +2186 -0
- package/bin/go/src/simd/archsimd/ops_emulated_amd64.go +205 -0
- package/bin/go/src/simd/archsimd/ops_emulated_wasm.go +212 -0
- package/bin/go/src/simd/archsimd/ops_internal_amd64.go +500 -56
- package/bin/go/src/simd/archsimd/ops_internal_arm64.go +234 -0
- package/bin/go/src/simd/archsimd/ops_wasm.go +1795 -0
- package/bin/go/src/simd/archsimd/other_gen_amd64.go +576 -72
- package/bin/go/src/simd/archsimd/other_gen_arm64.go +519 -0
- package/bin/go/src/simd/archsimd/shuffles_amd64.go +217 -76
- package/bin/go/src/simd/archsimd/slice_gen_amd64.go +594 -532
- package/bin/go/src/simd/archsimd/slice_gen_arm64.go +125 -0
- package/bin/go/src/simd/archsimd/slicepart_128.go +302 -0
- package/bin/go/src/simd/archsimd/slicepart_amd64.go +36 -235
- package/bin/go/src/simd/archsimd/slicepart_arm64.go +217 -0
- package/bin/go/src/simd/archsimd/slicepart_wasm.go +217 -0
- package/bin/go/src/simd/archsimd/string.go +1 -1
- package/bin/go/src/simd/archsimd/types_amd64.go +165 -341
- package/bin/go/src/simd/archsimd/types_arm64.go +224 -0
- package/bin/go/src/simd/archsimd/types_wasm.go +354 -0
- package/bin/go/src/simd/archsimd/unsafe_helpers.go +60 -0
- package/bin/go/src/simd/doc.go +91 -0
- package/bin/go/src/simd/dummy.s +7 -0
- package/bin/go/src/simd/internal/bridge/decls_amd64.go +4085 -0
- package/bin/go/src/simd/internal/bridge/decls_arm64.go +1369 -0
- package/bin/go/src/simd/internal/bridge/decls_wasm.go +1369 -0
- package/bin/go/src/simd/internal/bridge/import_hook.go +13 -0
- package/bin/go/src/simd/internal/bridge/simd_emulated.go +3275 -0
- package/bin/go/src/simd/internal/bridge/simd_types_emulated.go +95 -0
- package/bin/go/src/simd/internal/bridge/tofrom_128.go +65 -0
- package/bin/go/src/simd/internal/bridge/tofrom_amd64.go +123 -0
- package/bin/go/src/simd/internal/bridge/tofrom_emulated.go +63 -0
- package/bin/go/src/simd/midway_amd64.go +34 -0
- package/bin/go/src/simd/midway_arm64.go +22 -0
- package/bin/go/src/simd/midway_common.go +138 -0
- package/bin/go/src/simd/midway_wasm.go +13 -0
- package/bin/go/src/simd/simd_emulated.go +3275 -0
- package/bin/go/src/simd/simd_stubs.go +1041 -0
- package/bin/go/src/simd/simd_types.go +96 -0
- package/bin/go/src/simd/tofrom_amd64.go +374 -0
- package/bin/go/src/simd/tofrom_arm64.go +290 -0
- package/bin/go/src/simd/tofrom_wasm.go +290 -0
- package/bin/go/src/slices/slices.go +9 -7
- package/bin/go/src/strconv/isprint.go +81 -51
- package/bin/go/src/strings/builder.go +1 -1
- package/bin/go/src/strings/strings.go +44 -35
- package/bin/go/src/sync/atomic/doc.go +7 -0
- package/bin/go/src/sync/cond.go +4 -2
- package/bin/go/src/sync/pool.go +6 -15
- package/bin/go/src/sync/runtime2_lockrank.go +1 -2
- package/bin/go/src/syscall/exec_bsd.go +3 -3
- package/bin/go/src/syscall/exec_libc2.go +1 -1
- package/bin/go/src/syscall/exec_linux.go +7 -2
- package/bin/go/src/syscall/fs_js.go +9 -4
- package/bin/go/src/syscall/fs_wasip1.go +6 -0
- package/bin/go/src/syscall/js/js.go +2 -2
- package/bin/go/src/syscall/linkname_bsd.go +8 -0
- package/bin/go/src/syscall/linkname_libc.go +1 -1
- package/bin/go/src/syscall/linkname_openbsd.go +0 -2
- package/bin/go/src/syscall/mkall.sh +6 -17
- package/bin/go/src/syscall/syscall_aix.go +5 -0
- package/bin/go/src/syscall/syscall_linux_386.go +9 -0
- package/bin/go/src/syscall/syscall_linux_amd64.go +5 -0
- package/bin/go/src/syscall/syscall_linux_arm.go +4 -0
- package/bin/go/src/syscall/syscall_linux_arm64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_loong64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_mipsx.go +4 -0
- package/bin/go/src/syscall/syscall_linux_riscv64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_s390x.go +5 -0
- package/bin/go/src/syscall/syscall_openbsd.go +77 -2
- package/bin/go/src/syscall/syscall_plan9.go +25 -0
- package/bin/go/src/syscall/syscall_solaris.go +11 -0
- package/bin/go/src/syscall/syscall_unix.go +19 -0
- package/bin/go/src/syscall/syscall_windows.go +1 -1
- package/bin/go/src/testing/synctest/synctest.go +21 -0
- package/bin/go/src/testing/testing.go +211 -52
- package/bin/go/src/text/template/parse/lex.go +6 -6
- package/bin/go/src/text/template/parse/node.go +21 -16
- package/bin/go/src/text/template/parse/parse.go +23 -6
- package/bin/go/src/text/template/template.go +5 -3
- package/bin/go/src/time/format.go +3 -0
- package/bin/go/src/time/sleep.go +0 -33
- package/bin/go/src/time/tick.go +3 -2
- package/bin/go/src/time/time.go +2 -2
- package/bin/go/src/time/tzdata/zzipdata.go +1 -1
- package/bin/go/src/time/zoneinfo.go +5 -4
- package/bin/go/src/time/zoneinfo_read.go +1 -1
- package/bin/go/src/unicode/tables.go +898 -417
- package/bin/go/src/uuid/uuid.go +273 -0
- package/bin/go/src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go +3 -3
- package/bin/go/src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s +2066 -6598
- package/bin/go/src/vendor/golang.org/x/crypto/hkdf/hkdf.go +100 -0
- package/bin/go/src/vendor/golang.org/x/net/dns/dnsmessage/message.go +5 -4
- package/bin/go/src/vendor/golang.org/x/net/http/httpproxy/proxy.go +4 -4
- package/bin/go/src/vendor/golang.org/x/net/http3/http3.go +46 -0
- package/bin/go/src/vendor/golang.org/x/net/idna/{idna10.0.0.go → idna.go} +133 -35
- package/bin/go/src/vendor/golang.org/x/net/idna/punycode.go +4 -1
- package/bin/go/src/vendor/golang.org/x/net/idna/tables15.0.0.go +1 -1
- package/bin/go/src/vendor/golang.org/x/net/idna/tables17.0.0.go +5302 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/body.go +231 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/conn.go +131 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/doc.go +10 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/errors.go +102 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/http3.go +95 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack.go +356 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_decode.go +81 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_encode.go +61 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_static.go +142 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/quic.go +40 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/roundtrip.go +423 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/server.go +866 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/settings.go +66 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/stream.go +260 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/transport.go +333 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/varint.go +23 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/request.go +475 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/quic/quicwire/wire.go +150 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/ack_delay.go +26 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/acks.go +213 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/atomic_bits.go +31 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/config.go +158 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/congestion_reno.go +306 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn.go +434 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_close.go +340 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_flow.go +142 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_id.go +502 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_loss.go +85 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_recv.go +631 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_send.go +407 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_streams.go +483 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/crypto_stream.go +157 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/dgram.go +53 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/doc.go +50 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/endpoint.go +478 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/errors.go +129 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/frame_debug.go +730 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/gate.go +86 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/idle.go +168 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/log.go +67 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/loss.go +521 -0
- package/bin/go/src/{runtime/cgo/gcc_stack_windows.c → vendor/golang.org/x/net/quic/math.go} +7 -2
- package/bin/go/src/vendor/golang.org/x/net/quic/pacer.go +129 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet.go +267 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_number.go +72 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_parser.go +519 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_protection.go +539 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_writer.go +566 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/path.go +87 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/ping.go +14 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/pipe.go +173 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/qlog.go +272 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/queue.go +63 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/quic.go +221 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/race_disabled.go +10 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/race_enabled.go +27 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/rangeset.go +193 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/retry.go +240 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/rtt.go +71 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_packet.go +119 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_packet_list.go +93 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_val.go +103 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/skip.go +62 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stateless_reset.go +59 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stream.go +1106 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stream_limits.go +138 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/tls.go +123 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/transport_params.go +283 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp.go +28 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_darwin.go +45 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_linux.go +39 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_msg.go +245 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_other.go +62 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_packetconn.go +67 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/asm_darwin_arm64_gc.s +12 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu.go +12 -7
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_arm64.go +3 -6
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64.go +67 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64_other.go +31 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go +1 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go +2 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_loong64.go +14 -2
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go +4 -2
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +1 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_windows.go +26 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_windows_arm64.go +38 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_x86.go +124 -50
- package/bin/go/src/vendor/golang.org/x/sys/cpu/syscall_darwin_arm64_gc.go +54 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/zcpu_windows.go +48 -0
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule.go +4 -0
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +1 -1
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables17.0.0.go +2135 -0
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/forminfo.go +18 -8
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +1410 -1410
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/{tables13.0.0.go → tables17.0.0.go} +3530 -3186
- package/bin/go/src/vendor/modules.txt +14 -8
- package/bin/ttsc-cache.exe +0 -0
- package/bin/ttsc.exe +0 -0
- package/bin/ttscserver.exe +0 -0
- package/package.json +1 -1
- package/bin/go/src/crypto/internal/fips140/nistec/p256_ordinv_noasm.go +0 -13
- package/bin/go/src/go/internal/scannerhooks/hooks.go +0 -11
- package/bin/go/src/hash/maphash/maphash_purego.go +0 -200
- package/bin/go/src/hash/maphash/maphash_runtime.go +0 -64
- package/bin/go/src/internal/goexperiment/exp_goroutineleakprofile_off.go +0 -8
- package/bin/go/src/internal/goexperiment/exp_goroutineleakprofile_on.go +0 -8
- package/bin/go/src/internal/strconv/atofeisel.go +0 -166
- package/bin/go/src/internal/strconv/ftoadbox.go +0 -349
- package/bin/go/src/internal/strconv/ftoafixed.go +0 -184
- package/bin/go/src/internal/strconv/math.go +0 -179
- package/bin/go/src/net/http/h2_bundle.go +0 -12371
- package/bin/go/src/net/http/h2_error.go +0 -37
- package/bin/go/src/runtime/cgo/gcc_darwin_amd64.c +0 -61
- package/bin/go/src/runtime/cgo/gcc_darwin_arm64.c +0 -148
- package/bin/go/src/runtime/cgo/gcc_dragonfly_amd64.c +0 -61
- package/bin/go/src/runtime/cgo/gcc_freebsd.c +0 -72
- package/bin/go/src/runtime/cgo/gcc_freebsd_amd64.c +0 -72
- package/bin/go/src/runtime/cgo/gcc_linux.c +0 -67
- package/bin/go/src/runtime/cgo/gcc_linux_amd64.c +0 -92
- package/bin/go/src/runtime/cgo/gcc_linux_arm64.c +0 -88
- package/bin/go/src/runtime/cgo/gcc_linux_s390x.c +0 -64
- package/bin/go/src/runtime/cgo/gcc_openbsd.c +0 -62
- package/bin/go/src/runtime/cgo/gcc_ppc64x.c +0 -68
- package/bin/go/src/runtime/cgo/gcc_signal2_ios_arm64.c +0 -11
- package/bin/go/src/runtime/cgo/gcc_signal_ios_arm64.c +0 -213
- package/bin/go/src/runtime/cgo/gcc_signal_ios_nolldb.c +0 -10
- package/bin/go/src/runtime/cgo/gcc_solaris_amd64.c +0 -83
- package/bin/go/src/runtime/cgo/gcc_stack_darwin.c +0 -25
- package/bin/go/src/runtime/cgo/gcc_stack_unix.c +0 -48
- package/bin/go/src/runtime/cgo/gcc_windows_386.c +0 -55
- package/bin/go/src/runtime/cgo/gcc_windows_amd64.c +0 -54
- package/bin/go/src/runtime/cgo/gcc_windows_arm64.c +0 -42
- package/bin/go/src/runtime/cgo/libcgo_windows.h +0 -6
- package/bin/go/src/runtime/cgo/signal_ios_arm64.go +0 -10
- package/bin/go/src/runtime/cgo/signal_ios_arm64.s +0 -56
- package/bin/go/src/runtime/rt0_linux_ppc64.s +0 -28
- package/bin/go/src/runtime/stubs_ppc64.go +0 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/go.yaml +0 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go.yaml +0 -172
- package/bin/go/src/syscall/asm_openbsd_mips64.s +0 -129
- package/bin/go/src/syscall/syscall_openbsd1.go +0 -12
- package/bin/go/src/syscall/syscall_openbsd_libc.go +0 -84
- package/bin/go/src/syscall/syscall_openbsd_mips64.go +0 -43
- package/bin/go/src/syscall/zerrors_openbsd_mips64.go +0 -1682
- package/bin/go/src/syscall/zsyscall_openbsd_mips64.go +0 -1289
- package/bin/go/src/syscall/zsysnum_openbsd_mips64.go +0 -218
- package/bin/go/src/syscall/ztypes_openbsd_mips64.go +0 -443
- package/bin/go/src/vendor/golang.org/x/net/idna/go118.go +0 -13
- package/bin/go/src/vendor/golang.org/x/net/idna/idna9.0.0.go +0 -717
- package/bin/go/src/vendor/golang.org/x/net/idna/pre_go118.go +0 -11
- package/bin/go/src/vendor/golang.org/x/net/idna/tables10.0.0.go +0 -4559
- package/bin/go/src/vendor/golang.org/x/net/idna/tables11.0.0.go +0 -4653
- package/bin/go/src/vendor/golang.org/x/net/idna/tables12.0.0.go +0 -4733
- package/bin/go/src/vendor/golang.org/x/net/idna/tables13.0.0.go +0 -4959
- package/bin/go/src/vendor/golang.org/x/net/idna/tables9.0.0.go +0 -4486
- package/bin/go/src/vendor/golang.org/x/net/idna/trie12.0.0.go +0 -30
- package/bin/go/src/vendor/golang.org/x/net/idna/trie13.0.0.go +0 -30
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +0 -11
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +0 -14
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +0 -1815
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +0 -1887
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +0 -1923
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +0 -1955
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +0 -1781
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +0 -7657
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +0 -7693
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +0 -7710
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +0 -7637
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Compares/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MinMax/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/{go.yaml → go_amd64.yaml} +0 -0
|
@@ -17,8 +17,9 @@ import (
|
|
|
17
17
|
"io"
|
|
18
18
|
"log"
|
|
19
19
|
"maps"
|
|
20
|
-
"math/rand"
|
|
20
|
+
"math/rand/v2"
|
|
21
21
|
"net"
|
|
22
|
+
"net/http/internal"
|
|
22
23
|
"net/textproto"
|
|
23
24
|
"net/url"
|
|
24
25
|
urlpkg "net/url"
|
|
@@ -40,7 +41,7 @@ var (
|
|
|
40
41
|
// ErrBodyNotAllowed is returned by ResponseWriter.Write calls
|
|
41
42
|
// when the HTTP method or response code does not permit a
|
|
42
43
|
// body.
|
|
43
|
-
ErrBodyNotAllowed =
|
|
44
|
+
ErrBodyNotAllowed = internal.ErrBodyNotAllowed
|
|
44
45
|
|
|
45
46
|
// ErrHijacked is returned by ResponseWriter.Write calls when
|
|
46
47
|
// the underlying connection has been hijacked using the
|
|
@@ -425,12 +426,13 @@ func (cw *chunkWriter) close() {
|
|
|
425
426
|
// A response represents the server side of an HTTP response.
|
|
426
427
|
type response struct {
|
|
427
428
|
conn *conn
|
|
428
|
-
req *Request
|
|
429
|
-
reqBody
|
|
429
|
+
req *Request // request for this response
|
|
430
|
+
reqBody *body // nil when NoBody
|
|
430
431
|
cancelCtx context.CancelFunc // when ServeHTTP exits
|
|
431
432
|
wroteHeader bool // a non-1xx header has been (logically) written
|
|
432
433
|
wants10KeepAlive bool // HTTP/1.0 w/ Connection "keep-alive"
|
|
433
434
|
wantsClose bool // HTTP request has Connection "close"
|
|
435
|
+
ecReader *expectContinueReader
|
|
434
436
|
|
|
435
437
|
// canWriteContinue is an atomic boolean that says whether or
|
|
436
438
|
// not a 100 Continue header can be written to the
|
|
@@ -569,11 +571,29 @@ func (w *response) requestTooLarge() {
|
|
|
569
571
|
}
|
|
570
572
|
}
|
|
571
573
|
|
|
572
|
-
// disableWriteContinue stops Request.Body.Read from sending an automatic
|
|
573
|
-
//
|
|
574
|
-
|
|
574
|
+
// disableWriteContinue stops Request.Body.Read from sending an automatic
|
|
575
|
+
// 100 Continue. As the name implies, it is only useful when the request
|
|
576
|
+
// expects a 100 Continue and the body is wrapped in an expectContinueReader;
|
|
577
|
+
// otherwise, it is a no-op.
|
|
578
|
+
// If a 100-Continue is being written, it waits for it to complete before
|
|
579
|
+
// continuing. If skipDrain is true, it also prevents the server from draining
|
|
580
|
+
// the request body and flags the connection to be closed after the reply, as
|
|
581
|
+
// the client will never send the body.
|
|
582
|
+
func (w *response) disableWriteContinue(skipDrain bool) {
|
|
583
|
+
if w.ecReader == nil {
|
|
584
|
+
return
|
|
585
|
+
}
|
|
575
586
|
w.writeContinueMu.Lock()
|
|
576
|
-
w.canWriteContinue.
|
|
587
|
+
if w.canWriteContinue.Load() {
|
|
588
|
+
w.canWriteContinue.Store(false)
|
|
589
|
+
if skipDrain {
|
|
590
|
+
// Make sure that the connection will not be reused by sending
|
|
591
|
+
// "Connection: close" header in the response.
|
|
592
|
+
w.closeAfterReply = true
|
|
593
|
+
// Ensure that the body will not be drained in Close.
|
|
594
|
+
w.ecReader.closed.Store(true)
|
|
595
|
+
}
|
|
596
|
+
}
|
|
577
597
|
w.writeContinueMu.Unlock()
|
|
578
598
|
}
|
|
579
599
|
|
|
@@ -603,9 +623,9 @@ func (w *response) ReadFrom(src io.Reader) (n int64, err error) {
|
|
|
603
623
|
// source is available (see golang.org/issue/5660) and provides
|
|
604
624
|
// enough bytes to perform Content-Type sniffing when required.
|
|
605
625
|
if !w.cw.wroteHeader {
|
|
606
|
-
n0, err := io.CopyBuffer(writerOnly{w}, io.LimitReader(src,
|
|
626
|
+
n0, err := io.CopyBuffer(writerOnly{w}, io.LimitReader(src, internal.SniffLen), buf)
|
|
607
627
|
n += n0
|
|
608
|
-
if err != nil || n0 <
|
|
628
|
+
if err != nil || n0 < internal.SniffLen {
|
|
609
629
|
return n, err
|
|
610
630
|
}
|
|
611
631
|
}
|
|
@@ -615,6 +635,30 @@ func (w *response) ReadFrom(src io.Reader) (n int64, err error) {
|
|
|
615
635
|
|
|
616
636
|
// Now that cw has been flushed, its chunking field is guaranteed initialized.
|
|
617
637
|
if !w.cw.chunking && w.bodyAllowed() && w.req.Method != "HEAD" {
|
|
638
|
+
// When a content length is declared, but exceeded; any excess bytes
|
|
639
|
+
// from src should be ignored, and ErrContentLength should be returned.
|
|
640
|
+
// This mirrors the behavior of response.Write.
|
|
641
|
+
if w.contentLength != -1 {
|
|
642
|
+
defer func(originalReader io.Reader) {
|
|
643
|
+
if w.written != w.contentLength {
|
|
644
|
+
return
|
|
645
|
+
}
|
|
646
|
+
if n, _ := originalReader.Read([]byte{0}); err == nil && n != 0 {
|
|
647
|
+
err = ErrContentLength
|
|
648
|
+
}
|
|
649
|
+
}(src)
|
|
650
|
+
// src can be an io.LimitedReader already. To avoid unnecessary
|
|
651
|
+
// alloc and having to unnest readers repeatedly in net.sendFile,
|
|
652
|
+
// just adjust the existing LimitedReader N when this is the case.
|
|
653
|
+
if lr, ok := src.(*io.LimitedReader); ok {
|
|
654
|
+
if lenDiff := lr.N - (w.contentLength - w.written); lenDiff > 0 {
|
|
655
|
+
defer func() { lr.N += lenDiff }()
|
|
656
|
+
lr.N -= lenDiff
|
|
657
|
+
}
|
|
658
|
+
} else {
|
|
659
|
+
src = io.LimitReader(src, w.contentLength-w.written)
|
|
660
|
+
}
|
|
661
|
+
}
|
|
618
662
|
n0, err := rf.ReadFrom(src)
|
|
619
663
|
n += n0
|
|
620
664
|
w.written += n0
|
|
@@ -894,6 +938,11 @@ func putBufioWriter(bw *bufio.Writer) {
|
|
|
894
938
|
// This can be overridden by setting [Server.MaxHeaderBytes].
|
|
895
939
|
const DefaultMaxHeaderBytes = 1 << 20 // 1 MB
|
|
896
940
|
|
|
941
|
+
// DefaultMaxHeaderValueCount is the maximum permitted number of
|
|
942
|
+
// header values in an HTTP request.
|
|
943
|
+
// This can be overridden by setting [Server.MaxHeaderValueCount].
|
|
944
|
+
const DefaultMaxHeaderValueCount = 500
|
|
945
|
+
|
|
897
946
|
func (s *Server) maxHeaderBytes() int {
|
|
898
947
|
if s.MaxHeaderBytes > 0 {
|
|
899
948
|
return s.MaxHeaderBytes
|
|
@@ -901,6 +950,13 @@ func (s *Server) maxHeaderBytes() int {
|
|
|
901
950
|
return DefaultMaxHeaderBytes
|
|
902
951
|
}
|
|
903
952
|
|
|
953
|
+
func (s *Server) maxHeaderValueCount() int {
|
|
954
|
+
if s.MaxHeaderValueCount > 0 {
|
|
955
|
+
return s.MaxHeaderValueCount
|
|
956
|
+
}
|
|
957
|
+
return DefaultMaxHeaderValueCount
|
|
958
|
+
}
|
|
959
|
+
|
|
904
960
|
func (s *Server) initialReadLimitSize() int64 {
|
|
905
961
|
return int64(s.maxHeaderBytes()) + 4096 // bufio slop
|
|
906
962
|
}
|
|
@@ -933,7 +989,6 @@ type expectContinueReader struct {
|
|
|
933
989
|
resp *response
|
|
934
990
|
readCloser io.ReadCloser
|
|
935
991
|
closed atomic.Bool
|
|
936
|
-
sawEOF atomic.Bool
|
|
937
992
|
}
|
|
938
993
|
|
|
939
994
|
func (ecr *expectContinueReader) Read(p []byte) (n int, err error) {
|
|
@@ -950,15 +1005,16 @@ func (ecr *expectContinueReader) Read(p []byte) (n int, err error) {
|
|
|
950
1005
|
}
|
|
951
1006
|
w.writeContinueMu.Unlock()
|
|
952
1007
|
}
|
|
953
|
-
|
|
954
|
-
if err == io.EOF {
|
|
955
|
-
ecr.sawEOF.Store(true)
|
|
956
|
-
}
|
|
957
|
-
return
|
|
1008
|
+
return ecr.readCloser.Read(p)
|
|
958
1009
|
}
|
|
959
1010
|
|
|
960
1011
|
func (ecr *expectContinueReader) Close() error {
|
|
961
|
-
ecr.
|
|
1012
|
+
if ecr.resp.canWriteContinue.Load() {
|
|
1013
|
+
ecr.resp.disableWriteContinue(true)
|
|
1014
|
+
}
|
|
1015
|
+
if ecr.closed.Swap(true) {
|
|
1016
|
+
return nil
|
|
1017
|
+
}
|
|
962
1018
|
return ecr.readCloser.Close()
|
|
963
1019
|
}
|
|
964
1020
|
|
|
@@ -995,7 +1051,7 @@ func (c *conn) readRequest(ctx context.Context) (w *response, err error) {
|
|
|
995
1051
|
peek, _ := c.bufr.Peek(4) // ReadRequest will get err below
|
|
996
1052
|
c.bufr.Discard(numLeadingCRorLF(peek))
|
|
997
1053
|
}
|
|
998
|
-
req, err :=
|
|
1054
|
+
req, err := readRequestLimit(c.bufr, int64(c.server.maxHeaderValueCount()))
|
|
999
1055
|
if err != nil {
|
|
1000
1056
|
if c.r.hitReadLimit() {
|
|
1001
1057
|
return nil, errTooLarge
|
|
@@ -1034,8 +1090,14 @@ func (c *conn) readRequest(ctx context.Context) (w *response, err error) {
|
|
|
1034
1090
|
req.ctx = ctx
|
|
1035
1091
|
req.RemoteAddr = c.remoteAddr
|
|
1036
1092
|
req.TLS = c.tlsState
|
|
1037
|
-
|
|
1038
|
-
|
|
1093
|
+
var reqBody *body
|
|
1094
|
+
switch b := req.Body.(type) {
|
|
1095
|
+
case noBody:
|
|
1096
|
+
case *body:
|
|
1097
|
+
reqBody = b
|
|
1098
|
+
reqBody.doEarlyClose = true
|
|
1099
|
+
default:
|
|
1100
|
+
panic(fmt.Errorf("http: unexpected request body type %T", req.Body))
|
|
1039
1101
|
}
|
|
1040
1102
|
|
|
1041
1103
|
c.rwc.SetReadDeadline(wholeReqDeadline)
|
|
@@ -1044,7 +1106,7 @@ func (c *conn) readRequest(ctx context.Context) (w *response, err error) {
|
|
|
1044
1106
|
conn: c,
|
|
1045
1107
|
cancelCtx: cancelCtx,
|
|
1046
1108
|
req: req,
|
|
1047
|
-
reqBody:
|
|
1109
|
+
reqBody: reqBody,
|
|
1048
1110
|
handlerHeader: make(Header),
|
|
1049
1111
|
contentLength: -1,
|
|
1050
1112
|
|
|
@@ -1125,7 +1187,8 @@ func relevantCaller() runtime.Frame {
|
|
|
1125
1187
|
frames := runtime.CallersFrames(pc[:n])
|
|
1126
1188
|
var frame runtime.Frame
|
|
1127
1189
|
for {
|
|
1128
|
-
|
|
1190
|
+
var more bool
|
|
1191
|
+
frame, more = frames.Next()
|
|
1129
1192
|
if !strings.HasPrefix(frame.Function, "net/http.") {
|
|
1130
1193
|
return frame
|
|
1131
1194
|
}
|
|
@@ -1149,10 +1212,12 @@ func (w *response) WriteHeader(code int) {
|
|
|
1149
1212
|
}
|
|
1150
1213
|
checkWriteHeaderCode(code)
|
|
1151
1214
|
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1215
|
+
// Sending a 100 Continue or any non-1XX header disables the
|
|
1216
|
+
// automatically-sent 100 Continue from Request.Body.Read. If it is a final
|
|
1217
|
+
// response (200 or higher), we skip draining the request body, which the
|
|
1218
|
+
// client will never send.
|
|
1219
|
+
if code == 100 || code >= 200 {
|
|
1220
|
+
w.disableWriteContinue(code >= 200)
|
|
1156
1221
|
}
|
|
1157
1222
|
|
|
1158
1223
|
// Handle informational headers.
|
|
@@ -1365,7 +1430,7 @@ func (cw *chunkWriter) writeHeader(p []byte) {
|
|
|
1365
1430
|
// than to read the body. For now, assume that if we're sending
|
|
1366
1431
|
// headers, the handler is done reading the body and we should
|
|
1367
1432
|
// drop the connection if we haven't seen EOF.
|
|
1368
|
-
if
|
|
1433
|
+
if w.ecReader != nil && w.reqBody.bodyRemains() {
|
|
1369
1434
|
w.closeAfterReply = true
|
|
1370
1435
|
}
|
|
1371
1436
|
|
|
@@ -1388,53 +1453,28 @@ func (cw *chunkWriter) writeHeader(p []byte) {
|
|
|
1388
1453
|
// before reading a response may deadlock in this case.
|
|
1389
1454
|
// This behavior has been present since CL 5268043 (2011), however,
|
|
1390
1455
|
// so it doesn't seem to be causing problems.
|
|
1391
|
-
if w.req.ContentLength != 0 && !w.closeAfterReply && !w.fullDuplex {
|
|
1456
|
+
if w.req.ContentLength != 0 && w.reqBody != nil && !w.closeAfterReply && !w.fullDuplex {
|
|
1392
1457
|
var discard, tooBig bool
|
|
1393
|
-
|
|
1394
|
-
switch
|
|
1395
|
-
case
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
bdy.mu.Lock()
|
|
1400
|
-
switch {
|
|
1401
|
-
case bdy.closed:
|
|
1402
|
-
if !bdy.sawEOF {
|
|
1403
|
-
// Body was closed in handler with non-EOF error.
|
|
1404
|
-
w.closeAfterReply = true
|
|
1405
|
-
}
|
|
1406
|
-
case bdy.unreadDataSizeLocked() >= maxPostHandlerReadBytes:
|
|
1407
|
-
tooBig = true
|
|
1408
|
-
default:
|
|
1409
|
-
discard = true
|
|
1458
|
+
w.reqBody.mu.Lock()
|
|
1459
|
+
switch {
|
|
1460
|
+
case w.reqBody.closed:
|
|
1461
|
+
if !w.reqBody.sawEOF {
|
|
1462
|
+
// Body was closed in handler with non-EOF error.
|
|
1463
|
+
w.closeAfterReply = true
|
|
1410
1464
|
}
|
|
1411
|
-
|
|
1465
|
+
case w.reqBody.unreadDataSizeLocked() >= maxPostHandlerReadBytes:
|
|
1466
|
+
tooBig = true
|
|
1412
1467
|
default:
|
|
1413
1468
|
discard = true
|
|
1414
1469
|
}
|
|
1470
|
+
w.reqBody.mu.Unlock()
|
|
1415
1471
|
|
|
1416
1472
|
if discard {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
case nil:
|
|
1420
|
-
// There must be even more data left over.
|
|
1421
|
-
tooBig = true
|
|
1422
|
-
case ErrBodyReadAfterClose:
|
|
1423
|
-
// Body was already consumed and closed.
|
|
1424
|
-
case io.EOF:
|
|
1425
|
-
// The remaining body was just consumed, close it.
|
|
1426
|
-
err = w.reqBody.Close()
|
|
1427
|
-
if err != nil {
|
|
1428
|
-
w.closeAfterReply = true
|
|
1429
|
-
}
|
|
1430
|
-
default:
|
|
1431
|
-
// Some other kind of error occurred, like a read timeout, or
|
|
1432
|
-
// corrupt chunked encoding. In any case, whatever remains
|
|
1433
|
-
// on the wire must not be parsed as another HTTP request.
|
|
1473
|
+
w.reqBody.Close()
|
|
1474
|
+
if w.reqBody.didEarlyClose() {
|
|
1434
1475
|
w.closeAfterReply = true
|
|
1435
1476
|
}
|
|
1436
1477
|
}
|
|
1437
|
-
|
|
1438
1478
|
if tooBig {
|
|
1439
1479
|
w.requestTooLarge()
|
|
1440
1480
|
delHeader("Connection")
|
|
@@ -1647,7 +1687,7 @@ func (w *response) write(lenData int, dataB []byte, dataS string) (n int, err er
|
|
|
1647
1687
|
|
|
1648
1688
|
if w.canWriteContinue.Load() {
|
|
1649
1689
|
// Body reader wants to write 100 Continue but hasn't yet. Tell it not to.
|
|
1650
|
-
w.disableWriteContinue()
|
|
1690
|
+
w.disableWriteContinue(true)
|
|
1651
1691
|
}
|
|
1652
1692
|
|
|
1653
1693
|
if !w.wroteHeader {
|
|
@@ -1684,9 +1724,16 @@ func (w *response) finishRequest() {
|
|
|
1684
1724
|
w.conn.bufw.Flush()
|
|
1685
1725
|
|
|
1686
1726
|
w.conn.r.abortPendingRead()
|
|
1727
|
+
w.reqBody.registerOnHitEOF(nil) // prevent new background read from starting
|
|
1728
|
+
|
|
1729
|
+
if w.canWriteContinue.Load() {
|
|
1730
|
+
w.disableWriteContinue(true)
|
|
1731
|
+
}
|
|
1687
1732
|
|
|
1688
1733
|
// Close the body (regardless of w.closeAfterReply) so we can
|
|
1689
1734
|
// re-use its bufio.Reader later safely.
|
|
1735
|
+
//
|
|
1736
|
+
// In full-duplex mode, this may also drain the remaining request body.
|
|
1690
1737
|
w.reqBody.Close()
|
|
1691
1738
|
|
|
1692
1739
|
if w.req.MultipartForm != nil {
|
|
@@ -1723,8 +1770,7 @@ func (w *response) shouldReuseConnection() bool {
|
|
|
1723
1770
|
}
|
|
1724
1771
|
|
|
1725
1772
|
func (w *response) closedRequestBodyEarly() bool {
|
|
1726
|
-
|
|
1727
|
-
return ok && body.didEarlyClose()
|
|
1773
|
+
return w.reqBody != nil && w.reqBody.didEarlyClose()
|
|
1728
1774
|
}
|
|
1729
1775
|
|
|
1730
1776
|
func (w *response) Flush() {
|
|
@@ -1880,7 +1926,7 @@ func (e statusError) Error() string { return StatusText(e.code) + ": " + e.text
|
|
|
1880
1926
|
// While any panic from ServeHTTP aborts the response to the client,
|
|
1881
1927
|
// panicking with ErrAbortHandler also suppresses logging of a stack
|
|
1882
1928
|
// trace to the server's error log.
|
|
1883
|
-
var ErrAbortHandler =
|
|
1929
|
+
var ErrAbortHandler = internal.ErrAbortHandler
|
|
1884
1930
|
|
|
1885
1931
|
// isCommonNetReadError reports whether err is a common error
|
|
1886
1932
|
// encountered during reading a request off the network when the
|
|
@@ -1899,10 +1945,6 @@ func isCommonNetReadError(err error) bool {
|
|
|
1899
1945
|
return false
|
|
1900
1946
|
}
|
|
1901
1947
|
|
|
1902
|
-
type connectionStater interface {
|
|
1903
|
-
ConnectionState() tls.ConnectionState
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
1948
|
// Serve a new connection.
|
|
1907
1949
|
func (c *conn) serve(ctx context.Context) {
|
|
1908
1950
|
if ra := c.rwc.RemoteAddr(); ra != nil {
|
|
@@ -1919,7 +1961,7 @@ func (c *conn) serve(ctx context.Context) {
|
|
|
1919
1961
|
}
|
|
1920
1962
|
if inFlightResponse != nil {
|
|
1921
1963
|
inFlightResponse.cancelCtx()
|
|
1922
|
-
inFlightResponse.disableWriteContinue()
|
|
1964
|
+
inFlightResponse.disableWriteContinue(true)
|
|
1923
1965
|
}
|
|
1924
1966
|
if !c.hijacked() {
|
|
1925
1967
|
if inFlightResponse != nil {
|
|
@@ -1931,14 +1973,24 @@ func (c *conn) serve(ctx context.Context) {
|
|
|
1931
1973
|
}
|
|
1932
1974
|
}()
|
|
1933
1975
|
|
|
1934
|
-
|
|
1976
|
+
type connectionStater interface {
|
|
1977
|
+
ConnectionState() tls.ConnectionState
|
|
1978
|
+
}
|
|
1979
|
+
type handshakeContexter interface {
|
|
1980
|
+
HandshakeContext(ctx context.Context) error
|
|
1981
|
+
}
|
|
1982
|
+
if connStater, ok := c.rwc.(connectionStater); ok {
|
|
1935
1983
|
tlsTO := c.server.tlsHandshakeTimeout()
|
|
1936
1984
|
if tlsTO > 0 {
|
|
1937
1985
|
dl := time.Now().Add(tlsTO)
|
|
1938
1986
|
c.rwc.SetReadDeadline(dl)
|
|
1939
1987
|
c.rwc.SetWriteDeadline(dl)
|
|
1940
1988
|
}
|
|
1941
|
-
|
|
1989
|
+
var err error
|
|
1990
|
+
if handshaker, ok := c.rwc.(handshakeContexter); ok {
|
|
1991
|
+
err = handshaker.HandshakeContext(ctx)
|
|
1992
|
+
}
|
|
1993
|
+
if err != nil {
|
|
1942
1994
|
// If the handshake failed due to the client not speaking
|
|
1943
1995
|
// TLS, assume they're speaking plaintext HTTP and write a
|
|
1944
1996
|
// 400 response on the TLS conn's underlying net.Conn.
|
|
@@ -1959,13 +2011,25 @@ func (c *conn) serve(ctx context.Context) {
|
|
|
1959
2011
|
c.rwc.SetWriteDeadline(time.Time{})
|
|
1960
2012
|
}
|
|
1961
2013
|
c.tlsState = new(tls.ConnectionState)
|
|
1962
|
-
*c.tlsState =
|
|
1963
|
-
|
|
2014
|
+
*c.tlsState = connStater.ConnectionState()
|
|
2015
|
+
proto := c.tlsState.NegotiatedProtocol
|
|
2016
|
+
if proto == "h2" && c.server.h2 != nil {
|
|
2017
|
+
// net/http/internal/http2 path.
|
|
2018
|
+
//
|
|
2019
|
+
// Mark freshly created HTTP/2 as active and prevent any server state hooks
|
|
2020
|
+
// from being run on these connections. This prevents closeIdleConns from
|
|
2021
|
+
// closing such connections. See issue https://golang.org/issue/39776.
|
|
2022
|
+
c.setState(c.rwc, StateActive, skipHooks)
|
|
2023
|
+
const sawClientPreface = false
|
|
2024
|
+
c.server.serveHTTP2Conn(ctx, c.rwc, serverHandler{c.server}, sawClientPreface, nil, nil)
|
|
2025
|
+
return
|
|
2026
|
+
}
|
|
2027
|
+
tlsConn, tlsConnOK := c.rwc.(*tls.Conn)
|
|
2028
|
+
if validNextProto(proto) && tlsConnOK {
|
|
2029
|
+
// Legacy TLSNextProto path.
|
|
1964
2030
|
if fn := c.server.TLSNextProto[proto]; fn != nil {
|
|
1965
2031
|
h := initALPNRequest{ctx, tlsConn, serverHandler{c.server}}
|
|
1966
|
-
// Mark freshly created HTTP/2 as active
|
|
1967
|
-
// from being run on these connections. This prevents closeIdleConns from
|
|
1968
|
-
// closing such connections. See issue https://golang.org/issue/39776.
|
|
2032
|
+
// Mark freshly created HTTP/2 as active (see above).
|
|
1969
2033
|
c.setState(c.rwc, StateActive, skipHooks)
|
|
1970
2034
|
fn(c.server, tlsConn, h)
|
|
1971
2035
|
}
|
|
@@ -1973,7 +2037,7 @@ func (c *conn) serve(ctx context.Context) {
|
|
|
1973
2037
|
}
|
|
1974
2038
|
}
|
|
1975
2039
|
|
|
1976
|
-
// HTTP/1.x
|
|
2040
|
+
// HTTP/1.x or unencrypted HTTP/2.
|
|
1977
2041
|
|
|
1978
2042
|
// Set Request.TLS if the conn is not a *tls.Conn, but implements ConnectionState.
|
|
1979
2043
|
if c.tlsState == nil {
|
|
@@ -2005,6 +2069,8 @@ func (c *conn) serve(ctx context.Context) {
|
|
|
2005
2069
|
return
|
|
2006
2070
|
}
|
|
2007
2071
|
|
|
2072
|
+
// HTTP/1.x from here on.
|
|
2073
|
+
|
|
2008
2074
|
for {
|
|
2009
2075
|
w, err := c.readRequest(ctx)
|
|
2010
2076
|
if c.r.remain != c.server.initialReadLimitSize() {
|
|
@@ -2060,8 +2126,9 @@ func (c *conn) serve(ctx context.Context) {
|
|
|
2060
2126
|
if req.expectsContinue() {
|
|
2061
2127
|
if req.ProtoAtLeast(1, 1) && req.ContentLength != 0 {
|
|
2062
2128
|
// Wrap the Body reader with one that replies on the connection
|
|
2063
|
-
|
|
2129
|
+
w.ecReader = &expectContinueReader{readCloser: req.Body, resp: w}
|
|
2064
2130
|
w.canWriteContinue.Store(true)
|
|
2131
|
+
req.Body = w.ecReader
|
|
2065
2132
|
}
|
|
2066
2133
|
} else if req.Header.get("Expect") != "" {
|
|
2067
2134
|
w.sendExpectationFailed()
|
|
@@ -2070,8 +2137,11 @@ func (c *conn) serve(ctx context.Context) {
|
|
|
2070
2137
|
|
|
2071
2138
|
c.curReq.Store(w)
|
|
2072
2139
|
|
|
2073
|
-
|
|
2074
|
-
|
|
2140
|
+
// Start background read, which detects when a client has closed its connection
|
|
2141
|
+
// while a request handler is still running. When the request has a body, we
|
|
2142
|
+
// start the background read only after the entire body has been consumed.
|
|
2143
|
+
if w.reqBody.bodyRemains() {
|
|
2144
|
+
w.reqBody.registerOnHitEOF(w.conn.r.startBackgroundRead)
|
|
2075
2145
|
} else {
|
|
2076
2146
|
w.conn.r.startBackgroundRead()
|
|
2077
2147
|
}
|
|
@@ -2174,9 +2244,13 @@ func unencryptedTLSConn(c net.Conn) *tls.Conn {
|
|
|
2174
2244
|
const nextProtoUnencryptedHTTP2 = "unencrypted_http2"
|
|
2175
2245
|
|
|
2176
2246
|
func (c *conn) maybeServeUnencryptedHTTP2(ctx context.Context) bool {
|
|
2177
|
-
|
|
2178
|
-
if
|
|
2179
|
-
|
|
2247
|
+
var nextFunc func(*Server, *tls.Conn, Handler)
|
|
2248
|
+
if c.server.h2 == nil {
|
|
2249
|
+
var ok bool
|
|
2250
|
+
nextFunc, ok = c.server.TLSNextProto[nextProtoUnencryptedHTTP2]
|
|
2251
|
+
if !ok {
|
|
2252
|
+
return false
|
|
2253
|
+
}
|
|
2180
2254
|
}
|
|
2181
2255
|
hasPreface := func(c *conn, preface []byte) bool {
|
|
2182
2256
|
c.r.setReadLimit(int64(len(preface)) - int64(c.bufr.Buffered()))
|
|
@@ -2191,10 +2265,15 @@ func (c *conn) maybeServeUnencryptedHTTP2(ctx context.Context) bool {
|
|
|
2191
2265
|
return false
|
|
2192
2266
|
}
|
|
2193
2267
|
c.setState(c.rwc, StateActive, skipHooks)
|
|
2194
|
-
c.
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2268
|
+
if c.server.h2 != nil {
|
|
2269
|
+
const sawClientPreface = true
|
|
2270
|
+
c.server.serveHTTP2Conn(ctx, c.rwc, serverHandler{c.server}, sawClientPreface, nil, nil)
|
|
2271
|
+
} else {
|
|
2272
|
+
c.rwc.SetReadDeadline(time.Time{})
|
|
2273
|
+
c.rwc.SetWriteDeadline(time.Time{})
|
|
2274
|
+
h := unencryptedHTTP2Request{ctx, c.rwc, serverHandler{c.server}}
|
|
2275
|
+
nextFunc(c.server, unencryptedTLSConn(c.rwc), h)
|
|
2276
|
+
}
|
|
2198
2277
|
return true
|
|
2199
2278
|
}
|
|
2200
2279
|
|
|
@@ -2222,7 +2301,7 @@ func (w *response) Hijack() (rwc net.Conn, buf *bufio.ReadWriter, err error) {
|
|
|
2222
2301
|
if w.handlerDone.Load() {
|
|
2223
2302
|
panic("net/http: Hijack called after ServeHTTP finished")
|
|
2224
2303
|
}
|
|
2225
|
-
w.disableWriteContinue()
|
|
2304
|
+
w.disableWriteContinue(false)
|
|
2226
2305
|
if w.wroteHeader {
|
|
2227
2306
|
w.cw.flush()
|
|
2228
2307
|
}
|
|
@@ -2268,33 +2347,6 @@ func (w *response) closeNotify() {
|
|
|
2268
2347
|
}
|
|
2269
2348
|
}
|
|
2270
2349
|
|
|
2271
|
-
func registerOnHitEOF(rc io.ReadCloser, fn func()) {
|
|
2272
|
-
switch v := rc.(type) {
|
|
2273
|
-
case *expectContinueReader:
|
|
2274
|
-
registerOnHitEOF(v.readCloser, fn)
|
|
2275
|
-
case *body:
|
|
2276
|
-
v.registerOnHitEOF(fn)
|
|
2277
|
-
default:
|
|
2278
|
-
panic("unexpected type " + fmt.Sprintf("%T", rc))
|
|
2279
|
-
}
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2282
|
-
// requestBodyRemains reports whether future calls to Read
|
|
2283
|
-
// on rc might yield more data.
|
|
2284
|
-
func requestBodyRemains(rc io.ReadCloser) bool {
|
|
2285
|
-
if rc == NoBody {
|
|
2286
|
-
return false
|
|
2287
|
-
}
|
|
2288
|
-
switch v := rc.(type) {
|
|
2289
|
-
case *expectContinueReader:
|
|
2290
|
-
return requestBodyRemains(v.readCloser)
|
|
2291
|
-
case *body:
|
|
2292
|
-
return v.bodyRemains()
|
|
2293
|
-
default:
|
|
2294
|
-
panic("unexpected type " + fmt.Sprintf("%T", rc))
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
2350
|
// The HandlerFunc type is an adapter to allow the use of
|
|
2299
2351
|
// ordinary functions as HTTP handlers. If f is a function
|
|
2300
2352
|
// with the appropriate signature, HandlerFunc(f) is a
|
|
@@ -2712,7 +2764,7 @@ func (mux *ServeMux) findHandler(r *Request) (h Handler, patStr string, _ *patte
|
|
|
2712
2764
|
if n != nil {
|
|
2713
2765
|
patStr = n.pattern.String()
|
|
2714
2766
|
}
|
|
2715
|
-
u :=
|
|
2767
|
+
u := urlFromEscaped(path, r.URL.RawQuery)
|
|
2716
2768
|
return RedirectHandler(u.String(), StatusTemporaryRedirect), patStr, nil, nil
|
|
2717
2769
|
}
|
|
2718
2770
|
}
|
|
@@ -2757,12 +2809,35 @@ func (mux *ServeMux) matchOrRedirect(host, method, path string, u *url.URL) (_ *
|
|
|
2757
2809
|
// of findHandler, and that method returns before it does the "n == nil" check where
|
|
2758
2810
|
// the first return value matters. We return it here only to make the pattern available
|
|
2759
2811
|
// to findHandler.
|
|
2760
|
-
return n2, nil,
|
|
2812
|
+
return n2, nil, urlFromEscaped(path, u.RawQuery)
|
|
2761
2813
|
}
|
|
2762
2814
|
}
|
|
2763
2815
|
return n, matches, nil
|
|
2764
2816
|
}
|
|
2765
2817
|
|
|
2818
|
+
// urlFromEscaped returns a url.URL constructed from an escaped path and a raw
|
|
2819
|
+
// query.
|
|
2820
|
+
//
|
|
2821
|
+
// It ensures that the Path and RawPath fields are in sync by unescaping the
|
|
2822
|
+
// escaped path. Populating only the Path field and leaving RawPath empty (or
|
|
2823
|
+
// failing to keep them in sync) can cause url.URL.String to produce a URL with
|
|
2824
|
+
// either unexpected escaping (e.g., double-escaping "%" into "%25" in an
|
|
2825
|
+
// already escaped path) or a lack thereof (e.g., losing the escaping of "%2f"
|
|
2826
|
+
// and turning it into a literal path separator "/").
|
|
2827
|
+
func urlFromEscaped(escaped, rawQuery string) *url.URL {
|
|
2828
|
+
unescaped, err := url.PathUnescape(escaped)
|
|
2829
|
+
// Should be impossible, since ServeMux will reject unparsable URLs way
|
|
2830
|
+
// earlier.
|
|
2831
|
+
if err != nil {
|
|
2832
|
+
unescaped = escaped
|
|
2833
|
+
}
|
|
2834
|
+
return &url.URL{
|
|
2835
|
+
Path: unescaped,
|
|
2836
|
+
RawPath: escaped,
|
|
2837
|
+
RawQuery: rawQuery,
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2766
2841
|
// exactMatch reports whether the node's pattern exactly matches the path.
|
|
2767
2842
|
// As a special case, if the node is nil, exactMatch return false.
|
|
2768
2843
|
//
|
|
@@ -2953,8 +3028,9 @@ func (mux *ServeMux) registerErr(patstr string, handler Handler) error {
|
|
|
2953
3028
|
// The handler is typically nil, in which case [DefaultServeMux] is used.
|
|
2954
3029
|
//
|
|
2955
3030
|
// HTTP/2 support is only enabled if the Listener returns [*tls.Conn]
|
|
2956
|
-
// connections
|
|
2957
|
-
//
|
|
3031
|
+
// connections or connections which implement the same ConnectionState
|
|
3032
|
+
// method as *tls.Conn, and the connection state indicates that the "h2"
|
|
3033
|
+
// protocol was negotiated by ALPN.
|
|
2958
3034
|
//
|
|
2959
3035
|
// Serve always returns a non-nil error.
|
|
2960
3036
|
func Serve(l net.Listener, handler Handler) error {
|
|
@@ -3041,6 +3117,17 @@ type Server struct {
|
|
|
3041
3117
|
// If zero, DefaultMaxHeaderBytes is used.
|
|
3042
3118
|
MaxHeaderBytes int
|
|
3043
3119
|
|
|
3120
|
+
// MaxHeaderValueCount controls the maximum number of header
|
|
3121
|
+
// values that the server is willing to parse from a request.
|
|
3122
|
+
// If zero, DefaultMaxHeaderValueCount is used.
|
|
3123
|
+
// Comma-separated values in a single header line are counted
|
|
3124
|
+
// once, while values sent as multiple header lines are
|
|
3125
|
+
// counted multiple times. An exception to this is the Trailer
|
|
3126
|
+
// header, whose comma-separated values are counted separately,
|
|
3127
|
+
// as each of them is expected to be received later as an
|
|
3128
|
+
// individual trailer header line.
|
|
3129
|
+
MaxHeaderValueCount int
|
|
3130
|
+
|
|
3044
3131
|
// TLSNextProto optionally specifies a function to take over
|
|
3045
3132
|
// ownership of the provided TLS connection when an ALPN
|
|
3046
3133
|
// protocol upgrade has occurred. The map key is the protocol
|
|
@@ -3094,16 +3181,31 @@ type Server struct {
|
|
|
3094
3181
|
// the default is HTTP/1 only.
|
|
3095
3182
|
Protocols *Protocols
|
|
3096
3183
|
|
|
3184
|
+
// DisableClientPriority specifies whether client-specified priority, as
|
|
3185
|
+
// specified in RFC 9218, should be respected or not.
|
|
3186
|
+
//
|
|
3187
|
+
// This field only takes effect if using HTTP/2, and if no custom write
|
|
3188
|
+
// scheduler is defined for the HTTP/2 server. Otherwise, this field is a
|
|
3189
|
+
// no-op.
|
|
3190
|
+
//
|
|
3191
|
+
// If set to true, requests will be served in a round-robin manner, without
|
|
3192
|
+
// prioritization.
|
|
3193
|
+
DisableClientPriority bool
|
|
3194
|
+
|
|
3097
3195
|
inShutdown atomic.Bool // true when server is in shutdown
|
|
3098
3196
|
|
|
3099
3197
|
disableKeepAlives atomic.Bool
|
|
3100
3198
|
nextProtoOnce sync.Once // guards setupHTTP2_* init
|
|
3101
3199
|
nextProtoErr error // result of http2.ConfigureServer if used
|
|
3102
3200
|
|
|
3103
|
-
mu
|
|
3104
|
-
listeners
|
|
3105
|
-
activeConn
|
|
3106
|
-
onShutdown
|
|
3201
|
+
mu sync.Mutex
|
|
3202
|
+
listeners map[*net.Listener]struct{}
|
|
3203
|
+
activeConn map[*conn]struct{}
|
|
3204
|
+
onShutdown []func()
|
|
3205
|
+
h2 *http2Server
|
|
3206
|
+
h2Config http2ExternalServerConfig
|
|
3207
|
+
h2IdleTimeout time.Duration
|
|
3208
|
+
h3 *http3ServerHandler
|
|
3107
3209
|
|
|
3108
3210
|
listenerGroup sync.WaitGroup
|
|
3109
3211
|
}
|
|
@@ -3171,6 +3273,9 @@ func (s *Server) Shutdown(ctx context.Context) error {
|
|
|
3171
3273
|
s.inShutdown.Store(true)
|
|
3172
3274
|
|
|
3173
3275
|
s.mu.Lock()
|
|
3276
|
+
if s.h3 != nil {
|
|
3277
|
+
s.h3.shutdownCtx = ctx
|
|
3278
|
+
}
|
|
3174
3279
|
lnerr := s.closeListenersLocked()
|
|
3175
3280
|
for _, f := range s.onShutdown {
|
|
3176
3281
|
go f()
|
|
@@ -3181,7 +3286,7 @@ func (s *Server) Shutdown(ctx context.Context) error {
|
|
|
3181
3286
|
pollIntervalBase := time.Millisecond
|
|
3182
3287
|
nextPollInterval := func() time.Duration {
|
|
3183
3288
|
// Add 10% jitter.
|
|
3184
|
-
interval := pollIntervalBase + time.Duration(rand.
|
|
3289
|
+
interval := pollIntervalBase + time.Duration(rand.IntN(int(pollIntervalBase/10)))
|
|
3185
3290
|
// Double and clamp for next time.
|
|
3186
3291
|
pollIntervalBase *= 2
|
|
3187
3292
|
if pollIntervalBase > shutdownPollIntervalMax {
|
|
@@ -3404,7 +3509,7 @@ func (s *Server) shouldConfigureHTTP2ForServe() bool {
|
|
|
3404
3509
|
// passed this tls.Config to tls.NewListener. And if they did,
|
|
3405
3510
|
// it's too late anyway to fix it. It would only be potentially racy.
|
|
3406
3511
|
// See Issue 15908.
|
|
3407
|
-
return slices.Contains(s.TLSConfig.NextProtos,
|
|
3512
|
+
return slices.Contains(s.TLSConfig.NextProtos, "h2")
|
|
3408
3513
|
}
|
|
3409
3514
|
|
|
3410
3515
|
// ErrServerClosed is returned by the [Server.Serve], [ServeTLS], [ListenAndServe],
|
|
@@ -3422,6 +3527,21 @@ var ErrServerClosed = errors.New("http: Server closed")
|
|
|
3422
3527
|
// Serve always returns a non-nil error and closes l.
|
|
3423
3528
|
// After [Server.Shutdown] or [Server.Close], the returned error is [ErrServerClosed].
|
|
3424
3529
|
func (s *Server) Serve(l net.Listener) error {
|
|
3530
|
+
if conf, ok := l.(http2ExternalServerConfig); ok {
|
|
3531
|
+
// This is the sneaky path we use to let x/net/http2 wrap an http.Server:
|
|
3532
|
+
// http2.ConfigureServer calls http.Server.Serve with a net.Listener that
|
|
3533
|
+
// implements a certain interface, which we recognize here as an attempt
|
|
3534
|
+
// to associate an http2.Server with us.
|
|
3535
|
+
//
|
|
3536
|
+
// (This is about as principled as the way we (ab)use Transport.RegisterProtocol,
|
|
3537
|
+
// which is to say not at all. It's worth it.)
|
|
3538
|
+
s.setHTTP2Config(conf)
|
|
3539
|
+
// Server.Serve never returns a nil error under normal circumstances.
|
|
3540
|
+
// Returning nil here informs our caller that we support this sneaky
|
|
3541
|
+
// registration mechanism.
|
|
3542
|
+
return nil
|
|
3543
|
+
}
|
|
3544
|
+
|
|
3425
3545
|
if fn := testHookServerServe; fn != nil {
|
|
3426
3546
|
fn(s, l) // call hook with unwrapped listener
|
|
3427
3547
|
}
|
|
@@ -3485,6 +3605,22 @@ func (s *Server) Serve(l net.Listener) error {
|
|
|
3485
3605
|
}
|
|
3486
3606
|
}
|
|
3487
3607
|
|
|
3608
|
+
func (s *Server) setupTLSConfig(certFile, keyFile string, nextProtos []string) (*tls.Config, error) {
|
|
3609
|
+
config := cloneTLSConfig(s.TLSConfig)
|
|
3610
|
+
config.NextProtos = nextProtos
|
|
3611
|
+
|
|
3612
|
+
configHasCert := len(config.Certificates) > 0 || config.GetCertificate != nil || config.GetConfigForClient != nil
|
|
3613
|
+
if !configHasCert || certFile != "" || keyFile != "" {
|
|
3614
|
+
var err error
|
|
3615
|
+
config.Certificates = make([]tls.Certificate, 1)
|
|
3616
|
+
config.Certificates[0], err = tls.LoadX509KeyPair(certFile, keyFile)
|
|
3617
|
+
if err != nil {
|
|
3618
|
+
return nil, err
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
return config, nil
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3488
3624
|
// ServeTLS accepts incoming connections on the Listener l, creating a
|
|
3489
3625
|
// new service goroutine for each. The service goroutines perform TLS
|
|
3490
3626
|
// setup and then read requests, calling s.Handler to reply to them.
|
|
@@ -3506,17 +3642,13 @@ func (s *Server) ServeTLS(l net.Listener, certFile, keyFile string) error {
|
|
|
3506
3642
|
return err
|
|
3507
3643
|
}
|
|
3508
3644
|
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
config.Certificates[0], err = tls.LoadX509KeyPair(certFile, keyFile)
|
|
3517
|
-
if err != nil {
|
|
3518
|
-
return err
|
|
3519
|
-
}
|
|
3645
|
+
var nextProtos []string
|
|
3646
|
+
if s.TLSConfig != nil {
|
|
3647
|
+
nextProtos = s.TLSConfig.NextProtos
|
|
3648
|
+
}
|
|
3649
|
+
config, err := s.setupTLSConfig(certFile, keyFile, adjustNextProtos(nextProtos, s.protocols()))
|
|
3650
|
+
if err != nil {
|
|
3651
|
+
return err
|
|
3520
3652
|
}
|
|
3521
3653
|
|
|
3522
3654
|
tlsListener := tls.NewListener(l, config)
|
|
@@ -3525,6 +3657,15 @@ func (s *Server) ServeTLS(l net.Listener, certFile, keyFile string) error {
|
|
|
3525
3657
|
|
|
3526
3658
|
func (s *Server) protocols() Protocols {
|
|
3527
3659
|
if s.Protocols != nil {
|
|
3660
|
+
// Historically, even when Protocols for a Server was set to be empty,
|
|
3661
|
+
// the Server can still run normally with just HTTP/1.
|
|
3662
|
+
// To keep backward-compatibility, the zero value of Protocols is
|
|
3663
|
+
// defined as having only HTTP/1 enabled.
|
|
3664
|
+
if s.Protocols.empty() {
|
|
3665
|
+
var p Protocols
|
|
3666
|
+
p.SetHTTP1(true)
|
|
3667
|
+
return p
|
|
3668
|
+
}
|
|
3528
3669
|
return *s.Protocols // user-configured set
|
|
3529
3670
|
}
|
|
3530
3671
|
|
|
@@ -3705,6 +3846,61 @@ func ListenAndServeTLS(addr, certFile, keyFile string, handler Handler) error {
|
|
|
3705
3846
|
return server.ListenAndServeTLS(certFile, keyFile)
|
|
3706
3847
|
}
|
|
3707
3848
|
|
|
3849
|
+
// http3ServerHandler implements an interface in an external library that
|
|
3850
|
+
// supports HTTP/3, allowing an external implementation of HTTP/3 to be used
|
|
3851
|
+
// via net/http. See https://go.dev/issue/77440 for details.
|
|
3852
|
+
//
|
|
3853
|
+
// This is currently only used with golang.org/x/net/internal/http3, to allow
|
|
3854
|
+
// us to test our HTTP/3 implementation against tests in net/http. HTTP/3 is
|
|
3855
|
+
// not yet accessible to end-users.
|
|
3856
|
+
type http3ServerHandler struct {
|
|
3857
|
+
handler serverHandler
|
|
3858
|
+
tlsConfig *tls.Config
|
|
3859
|
+
baseCtx context.Context
|
|
3860
|
+
errc chan error
|
|
3861
|
+
shutdownCtx context.Context
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
// ServeHTTP ensures that http3ServerHandler implements the Handler interface,
|
|
3865
|
+
// and gives an HTTP/3 server implementation access to the net/http handler.
|
|
3866
|
+
func (h *http3ServerHandler) ServeHTTP(w ResponseWriter, r *Request) {
|
|
3867
|
+
h.handler.ServeHTTP(w, r)
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
// Addr gives an HTTP/3 server implementation the address that it should listen
|
|
3871
|
+
// on.
|
|
3872
|
+
func (h *http3ServerHandler) Addr() string {
|
|
3873
|
+
return h.handler.srv.Addr
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3876
|
+
// TLSConfig gives an HTTP/3 server implementation the *tls.Config that it
|
|
3877
|
+
// should use.
|
|
3878
|
+
func (h *http3ServerHandler) TLSConfig() *tls.Config {
|
|
3879
|
+
return h.tlsConfig
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3882
|
+
// BaseContext gives an HTTP/3 server implementation the base context to use
|
|
3883
|
+
// for server requests.
|
|
3884
|
+
func (h *http3ServerHandler) BaseContext() context.Context {
|
|
3885
|
+
return h.baseCtx
|
|
3886
|
+
}
|
|
3887
|
+
|
|
3888
|
+
// ListenErrHook should be called by an HTTP/3 server implementation to
|
|
3889
|
+
// propagate any error it encounters when trying to listen, if any, to
|
|
3890
|
+
// net/http.
|
|
3891
|
+
func (h *http3ServerHandler) ListenErrHook(err error) {
|
|
3892
|
+
h.errc <- err
|
|
3893
|
+
}
|
|
3894
|
+
|
|
3895
|
+
// ShutdownContext gives an HTTP/3 server implementation the context that is
|
|
3896
|
+
// used when [Server.Shutdown] is called. This allows an HTTP/3 server
|
|
3897
|
+
// implementation to know how long it can take to gracefully shutdown in the
|
|
3898
|
+
// function it registers with [Server.RegisterOnShutdown]. Callers must not use
|
|
3899
|
+
// this method for any other purpose.
|
|
3900
|
+
func (h *http3ServerHandler) ShutdownContext() context.Context {
|
|
3901
|
+
return h.shutdownCtx
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3708
3904
|
// ListenAndServeTLS listens on the TCP network address s.Addr and
|
|
3709
3905
|
// then calls [ServeTLS] to handle requests on incoming TLS connections.
|
|
3710
3906
|
// Accepted connections are configured to enable TCP keep-alives.
|
|
@@ -3729,13 +3925,40 @@ func (s *Server) ListenAndServeTLS(certFile, keyFile string) error {
|
|
|
3729
3925
|
addr = ":https"
|
|
3730
3926
|
}
|
|
3731
3927
|
|
|
3928
|
+
p := s.protocols()
|
|
3929
|
+
if p.http3() {
|
|
3930
|
+
fn, ok := s.TLSNextProto["http/3"]
|
|
3931
|
+
if !ok {
|
|
3932
|
+
return errors.New("http: Server.Protocols contains HTTP3, but Server does not support HTTP/3")
|
|
3933
|
+
}
|
|
3934
|
+
config, err := s.setupTLSConfig(certFile, keyFile, []string{"h3"})
|
|
3935
|
+
if err != nil {
|
|
3936
|
+
return err
|
|
3937
|
+
}
|
|
3938
|
+
errc := make(chan error, 1)
|
|
3939
|
+
s.mu.Lock()
|
|
3940
|
+
s.h3 = &http3ServerHandler{
|
|
3941
|
+
handler: serverHandler{s},
|
|
3942
|
+
tlsConfig: config,
|
|
3943
|
+
baseCtx: context.WithValue(context.Background(), ServerContextKey, s),
|
|
3944
|
+
errc: errc,
|
|
3945
|
+
}
|
|
3946
|
+
s.mu.Unlock()
|
|
3947
|
+
go fn(s, nil, s.h3)
|
|
3948
|
+
if err := <-errc; err != nil {
|
|
3949
|
+
return err
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
|
|
3953
|
+
// Only start a TCP listener if HTTP/1 or HTTP/2 is used.
|
|
3954
|
+
if !p.HTTP1() && !p.HTTP2() && !p.UnencryptedHTTP2() {
|
|
3955
|
+
return nil
|
|
3956
|
+
}
|
|
3732
3957
|
ln, err := net.Listen("tcp", addr)
|
|
3733
3958
|
if err != nil {
|
|
3734
3959
|
return err
|
|
3735
3960
|
}
|
|
3736
|
-
|
|
3737
3961
|
defer ln.Close()
|
|
3738
|
-
|
|
3739
3962
|
return s.ServeTLS(ln, certFile, keyFile)
|
|
3740
3963
|
}
|
|
3741
3964
|
|
|
@@ -3789,8 +4012,7 @@ func (s *Server) onceSetNextProtoDefaults() {
|
|
|
3789
4012
|
// to add it.
|
|
3790
4013
|
return
|
|
3791
4014
|
}
|
|
3792
|
-
|
|
3793
|
-
s.nextProtoErr = http2ConfigureServer(s, conf)
|
|
4015
|
+
s.configureHTTP2()
|
|
3794
4016
|
}
|
|
3795
4017
|
|
|
3796
4018
|
// TimeoutHandler returns a [Handler] that runs h with the given time limit.
|