Oleksandr Redko
bdd459ab0e
test: remove //nolint:govet comments ( #1729 )
2024-03-02 16:19:52 +01:00
Erik Dubbelboer
a04cd8c39f
Move Fuzz tests into their own file
...
This is required for https://github.com/google/oss-fuzz/pull/11453
2024-01-09 13:01:31 +01:00
nickajacks1
f0905a14d1
test: migrate remaining fuzzit tests to go 1.18 fuzzing ( #1687 )
2024-01-06 13:39:23 +08:00
Oleksandr Redko
ffdf59d04c
Enable gofumpt linter; format code gofumpt -w . ( #1576 )
2023-06-13 15:18:59 +02:00
Oleksandr Redko
f84e2346ba
Rename unexported funcs, vars to match common Go ( #1488 )
...
See https://github.com/golang/go/wiki/CodeReviewComments#initialisms
and https://go.dev/doc/effective_go#mixed-caps
2023-02-10 21:34:49 +08:00
Oleksandr Redko
c0c5f9cd38
doc,test: correct typos ( #1484 )
2023-02-09 09:29:28 +01:00
Erik Dubbelboer
7a5afddf5b
Use %v for errors and %q for strings ( #1262 )
...
Mostly in tests.
2022-04-01 18:11:16 +02:00
Erik Dubbelboer
7670c6eaa6
Fix windows tests ( #1235 )
...
* Fix windows tests
Just ignore /../ tests on windows until we have proper suppor.
* Remove useless test code
This code was basically just testing if tcp works. To test if
SO_REUSEPORT works we only have to try to listen on the same addr:port
twice.
* Fix test
2022-03-04 10:02:31 +01:00
Sergey Ponomarev
6a3cc2325b
uri_test.go use example.com for clearness ( #1212 )
...
* uri_test.go replace xxx.com with example.com
* uri_test.go replace foobar.com with example.com
* uri_test.go use example.com inside of testURIUpdate()
* uri_test.go use example.com instead of google.com
* uri_test.go use example.com instead of google.com
* uri_test.go testURIUpdate() host with port
2022-02-09 10:19:34 +01:00
Sergey Ponomarev
3ff6aaa591
uri: isHttps() and isHttp() ( #1150 )
...
* uri: isHttps() and isHttp()
Use them instead of manual schema comparison
* uri: use SetSchemeBytes()
2021-11-08 13:35:26 +01:00
Erik Dubbelboer
ad6d128614
URI.Parse should never change it's input
...
Decode the URI in place, but use the bytes of the URI instead of the
bytes of the input parameter.
2021-10-03 10:30:20 +02:00
Erik Dubbelboer
542a203b42
Properly parse URI
...
Use URI parse code based on net/uri to validate hostnames.
2021-10-01 13:38:31 +02:00
Erik Dubbelboer
9f2c63676d
Lower go test time
2021-06-18 14:57:18 +02:00
Erik Dubbelboer
87fc95849c
Run go test on github actions ( #1047 )
...
* Run go test on github actions
travis-ci.org has stopped.
See also: https://github.com/curl/curl/issues/7150
Downside: github actions don't support ppc64le
* Run less
* delete .travis.yml
* Remove travis + minor lint fixes
2021-06-18 13:36:54 +02:00
Darío
1b61ca2e36
Added Protocol() as a replacement of hardcoded strHTTP11 ( #969 )
...
* Added Protocol() as a replacement of hardcoded strHTTP11
* Applied review changes
* Modify h.proto in parseFirstLine
2021-02-16 21:53:40 +01:00
anshul-jain-aws
6234776e7c
Use QueryString while constructing RequestURI instead of QueryArgs if parsedQueryArgs is set to false ( #937 )
2021-01-02 21:14:25 +01:00
Vitali Pikulik
aa3f96c883
Git commit fix URI parse for urls like host.dm?some/path/to/file ( #866 )
2020-08-21 16:21:23 +02:00
Erik Dubbelboer
34a61fe63f
Update linting ( #851 )
2020-07-17 14:22:28 +02:00
Erik Dubbelboer
079f39bddc
Don't allow ASCII control character in URLs ( #790 )
...
* Don't allow ASCII control character in URLs
* Add tests
2020-04-25 20:54:59 +02:00
Erik Dubbelboer
76b74e34c2
Don't send the fragment/hash/# part of a URL to the server
...
Fixes https://github.com/valyala/fasthttp/issues/748
2020-02-28 18:56:02 +01:00
Erik Dubbelboer
6cccaebf64
Fix parsing relative URLs starting with // ( #702 )
...
* Fix parsing relative URLs starting with //
* Improve test
2019-12-01 09:44:21 +01:00
Erik Dubbelboer
32793db72d
Run golangci-lint using a Github Action
2019-11-16 18:09:28 +01:00
Erik Dubbelboer
c3d82ca3a4
Speed up testing by running tests in parallel
2019-10-16 10:20:13 +02:00
Daniel Firsht
ee8450036e
Added option to disable path normalization ( #649 )
2019-09-18 08:56:18 +02:00
xuecai
ed3793a1e1
add tests for copyto ( #545 )
...
* add tests for copyto
* add HeaderCopy Test reflect.DeepEqual
2019-02-17 10:11:45 +00:00
Erik Dubbelboer
50bdd6c77c
Fix appendQuotedPath to include all allowed characters
2018-09-05 20:06:18 +03:00
Aliaksandr Valialkin
e2ac397815
Parse bogus uris with missing slash after hostname like http://foobar.com?baz=123 , since such uris occur in real life :(
2017-11-08 13:05:29 +02:00
Aliaksandr Valialkin
0a7f0a797c
Updated tests and documentation for URI.Parse and URI.Update* regarding uris without scheme
2017-01-09 10:50:56 +02:00
Aliaksandr Valialkin
2662f2e1f4
Allow redirecting to urls without scheme, i.e. //google.com/foo.bar
2016-08-17 18:55:32 +03:00
Aliaksandr Valialkin
033bb40f06
Properly handle hashes and single dots in URI.Update (see https://github.com/kataras/iris/issues/173 )
2016-06-07 13:30:03 +03:00
Aliaksandr Valialkin
58e4dea85d
Properly copy query arguments in URI.CopyTo
2016-02-19 20:17:37 +02:00
Aliaksandr Valialkin
5a26dcce53
Added AcquireArgs and ReleaseArgs helper functions
2016-02-19 12:53:39 +02:00
Aliaksandr Valialkin
dcd687ba8b
Added AcquireURI and ReleaseURI
2016-02-17 12:10:53 +02:00
Aliaksandr Valialkin
5507d704f9
Issue #48 : added more tests and code prettifying after PR #50
2016-02-09 20:16:23 +02:00
Kristoffer Peterhänsel
2e947c76e1
Fix fragment parsing so it won't get url encoded if there is no query in front of it
2016-02-09 14:17:56 +01:00
Aliaksandr Valialkin
9b0b87c951
Added URI.LastPathSegment helper function
2016-01-04 14:23:07 +02:00
Aliaksandr Valialkin
9d4cd451d9
test URI.Update() with path containing non-ASCII chars
2015-12-23 11:29:17 +02:00
Aliaksandr Valialkin
ea8a7f54d5
Do not escape '-' and '_' in url path and query args
2015-12-22 20:18:19 +02:00
Aliaksandr Valialkin
b3c0a2cf75
Do not escape the most frequently used chars in uri path such as ':~=,'
2015-12-22 20:13:45 +02:00
Aliaksandr Valialkin
ed1d21e27d
Remove '/./' parts from path
2015-12-03 19:00:24 +02:00
Aliaksandr Valialkin
9f27e4c2b0
Added Update and CopyTo methods to URI
2015-11-28 14:45:13 +02:00
Aliaksandr Valialkin
46ac549ae1
Access URI members via accessors
2015-11-22 13:05:24 +02:00
Aliaksandr Valialkin
2b1eca3a70
Optimize request uri parsing - defer Host header reading
2015-11-19 15:05:27 +02:00
Aliaksandr Valialkin
230a396384
Hide URI.QueryArgs behind accessor, which automatically parses query args
2015-11-15 23:51:13 +02:00
Aliaksandr Valialkin
f1f78f0828
Hide Request.URI and Request.PostArgs behind accessors, which automatically call parse URI and PostArgs on first access
2015-11-15 23:47:22 +02:00
Aliaksandr Valialkin
4edb6bacf4
Use QueryString contents if QueryArgs is empty in URI.AppendBytes
2015-10-27 19:01:21 +02:00
Aliaksandr Valialkin
ffc2b7025d
Added URI path normalization, i.e. //foo//../bar converts to /foo/bar
2015-10-22 17:50:47 +03:00
Aliaksandr Valialkin
a049630bca
initial commit
2015-10-19 01:21:09 +03:00