DeepfakeHTTP icon indicating copy to clipboard operation
DeepfakeHTTP copied to clipboard

Feature suggestion: reflect request

Open bernd-wechner opened this issue 4 years ago • 6 comments
trafficstars

I came across this as a testing tool. It's nice, thanks. Another testing desire I have occasionally is to run an on line webserver temporarily that just responds with a complete and reliable description of the request it received. A request mirror. To test both the construction of and transport of requests I guess. Wonder if this is a nice tool to add that to, or if another exists that I've not found.

bernd-wechner avatar Sep 01 '21 03:09 bernd-wechner

A server response that completely reflects the request will be rejected by any HTTP client, because the first line of the request and response are different. For example, the first line of the request is "GET / HTTP/1.1" and the first line of the response is "HTTP/1.1 200 OK". Maybe add a raw request/response log option?

xnbox avatar Sep 01 '21 05:09 xnbox

I'd think it good enough to return the request as a well formatted text in a legal response (akin indeed to logging it to a text file and the serving that text file). Just a thought

bernd-wechner avatar Sep 01 '21 06:09 bernd-wechner

Sounds interesting, I like it! I put it on my TODO list. Thank you!

xnbox avatar Sep 01 '21 08:09 xnbox

v1.0.4

  • I have added a printout of live request/response pairs to the console (can be disabled with the --no-log switch)
  • In addition, I added live query/response pairs output to a file (see option --collect)
  • The formatted query output directly in the browser - not yet implemented.

xnbox avatar Sep 02 '21 15:09 xnbox

My first night making any time for this project in many months. Sorry I haven't been back sooner. But Tonight I gave this a spin, and imagine my surprise to see you're up to v6!

No luck immediately, though. But till report in another issue as I suspect I have a noob problem,

bernd-wechner avatar Mar 30 '22 11:03 bernd-wechner

isn't httpbin already satisfying these purposes?

LeiYangGH avatar Jun 20 '23 11:06 LeiYangGH