Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http dumps not working #108

Closed
gander opened this issue Dec 3, 2023 · 3 comments · Fixed by #112
Closed

Http dumps not working #108

gander opened this issue Dec 3, 2023 · 3 comments · Fixed by #112
Assignees
Labels
Milestone

Comments

@gander
Copy link

gander commented Dec 3, 2023

What more can I say? Whatever I send, I get a 404 and no result in the panel. How do I provide more details?

GET http:https://http-dump@localhost:8000/user/3/update
HTTP/1.1 404 Not Found
Server: nginx/1.20.2
Date: Sun, 03 Dec 2023 20:58:54 GMT
Content-Length: 0
Connection: keep-alive
Vary: Origin
<Response body is empty>

Response code: 404 (Not Found); Time: 2ms (2 ms); Content length: 0 bytes (0 B)
services:
    buggregator:
        image: ghcr.io/buggregator/server:latest
        pull_policy: always
        restart: always
        ports:
            - 127.0.0.1:8000:8000
@butschster butschster self-assigned this Dec 4, 2023
@butschster
Copy link
Member

Thanks for the bug report!

I've reviewed the code and realized that http-dump doesn't support detection using HTTP user info (http:https://http-dump@...). However, you can use an alternative method involving headers. Buggregator can send events for any module using HTTP headers. You can send a request with a header as shown in the example below.

$headers = ['X-Buggregator-Event' => 'http-dump'];

Here, http-dump is the module name.

I'll work on enabling event sending with event types specified via user info.

@butschster butschster added bug Something isn't working c: easy module [Http-dump] labels Dec 4, 2023
@butschster butschster added this to the 1.0 milestone Dec 4, 2023
butschster added a commit that referenced this issue Dec 4, 2023
```
http:https://http-dump@localhost:8000/user/3/update
         ^^^
```

fixes #108

---

AI commit text

Updated also the test files and methods dealing with the handling of HTTP dumps, Inspector and Sentry events to include test cases that cover the scenario when an HTTP user is present. The goal of this change is to ensure handling even when an HTTP user is specified. In `AnyHttpRequestDump.php`, a condition was added to check if the HTTP user equals "http-dump", which is anticipated in the newly added scenarios. In the test files, new test methods were written to simulate requests with an HTTP user and additional assertions were made to verify if the events were correctly processed.
@gander
Copy link
Author

gander commented Dec 4, 2023

Hmmm

POST http:https://localhost:8000/user/3/update
X-Buggregator-Event: http-dump
Content-Type: application/json

{"name": "John Doe"}

This way it's working

obraz

@butschster
Copy link
Member

butschster commented Dec 5, 2023

There is also a PR #112 via HTTP user option

Thx for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants