From 1b80eb56afc1e20a31f0b16ee52bd77772019086 Mon Sep 17 00:00:00 2001 From: Tom Hudson Date: Tue, 2 Jan 2018 20:06:32 +0000 Subject: [PATCH] Adds rawhttp section to readme --- README.mkd | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.mkd b/README.mkd index 04b861f..28437a1 100644 --- a/README.mkd +++ b/README.mkd @@ -121,6 +121,7 @@ Options: -c, --concurrency Set the concurrency level (defaut: 20) -d, --delay Milliseconds between requests to the same host (defaut: 5000) -H, --header
Send a custom HTTP header + -r, --rawhttp Use the rawhttp library for requests (experimental) -s, --savestatus Save only responses with specific status code -v, --verbose Verbose mode -X, --method HTTP method (default: GET) @@ -182,6 +183,28 @@ option: ... ``` +### Raw HTTP (Experimental) + +If you want to send requests that aren't valid - for example with invalid URL encoding - +the Go HTTP client will fail: + +``` +▶ meg /%%0a0afoo:bar +request failed: parse https://example.org/%%0a0afoo:bar: invalid URL escape "%%0" +``` + +You can use the `-r` or `--rawhttp` flag to enable use of the [rawhttp](https://github.com/tomnomnom/rawhttp) +library, which does little to no validation on the request: + +``` +▶ meg --verbose --rawhttp /%%0a0afoo:bar +out/example.com/eac3a4978bfb95992e270c311582e6da4568d83d https://example.com/%%0a0afoo:bar (HTTP/1.1 404 Not Found) +``` + +The `rawhttp` library and its use is experimental. Amongst other things it doesn't +yet support chunked transfer encoding, so you may notice chunk lengths interspersed +with your output if you use it. + ### Saving Only Certain Status Codes If you only want to save results that returned a certain status code, you can