Automatic Rules PeriodicArchiver should not use HTTP requests to self
See original GitHub issue // FIXME using an HTTP request to localhost here works well enough, but is needlessly
// complex. The API handler targeted here should be refactored to extract the logic that
// creates the recording from the logic that simply figures out the recording parameters
// from the POST form, path param, and headers. Then the handler should consume the API
// exposed by this refactored chunk, and this refactored chunk can also be consumed here
// rather than firing HTTP requests to ourselves
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
HTTP/1.1: Connections
HTTP requests and responses can be pipelined on a connection. ... Clients SHOULD NOT pipeline requests using non-idempotent methods or non-idempotent ...
Read more >An overview of HTTP - MDN Web Docs
HTTP is a protocol for fetching resources such as HTML documents. It is the foundation of any data exchange on the Web and...
Read more >HTTP requests - IBM
An HTTP request is made by a client, to a named host, which is located on a server. The aim of the request...
Read more >HTTP request smuggling - Web Security Academy - PortSwigger
In this section, we'll explain HTTP request smuggling attacks and describe how common request smuggling vulnerabilities can arise. Labs If you're already ....
Read more >RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1
The asterisk "*" means that the request does not apply to a particular resource, but to the server itself, and is only allowed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think what’s happening there is that you’re created an object called
spy
, which wraps around thearchiver
instance, and has your customized behaviour (throw an exception whenperformArchival
is called), but this doesn’t actually change the behaviour ofarchiver
- onlyspy
.If the
archiver
is modified so thatrun/performArchival
no longer usewebClient
but instead usetargetConnectionManager
instead, then you would modify thetargetConnectionManager
spy/mock so that it throws an exception when some method thatrun/performArchival
calls is called.You could probably put it into
RecordingCreationHelper
and just rename that class to something a little more general.