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

Axum HTTP tracker: scrape response in public mode #192

Conversation

josecelano
Copy link
Member

scrape request in the new Axum HTTP tracker implementation. Only por public mode.

…xum HTTP tracker

with only one infohash in the URL:

http://localhost:7070/scrape?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0

It does not allow more than one infohas yet.
@josecelano josecelano linked an issue Feb 22, 2023 that may be closed by this pull request
THat dependency will be use to store URL query param in a MultiMap
struct, becuase query params can have multiple values like this:

```
param1=value1&param1=value2
```

The multimaps allows to add multiple values to a HashMap.
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Feb 23, 2023
… same param

The `torrust_tracker::http::axum_implementation::query` allow mutiple
values for the same URL query param, for example:

```
param1=value1&param2=value2
```

It's needed in the `scrape` request:

http://localhost:7070/scrape?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0
… same param

The `torrust_tracker::http::axum_implementation::query` allow mutiple
values for the same URL query param, for example:

```
param1=value1&param2=value2
```

It's needed in the `scrape` request:

http://localhost:7070/scrape?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0
@josecelano josecelano force-pushed the issue-191-axum-http-tracker-scrape-req-public-mode branch from 6b8c8bf to 0c7735a Compare February 23, 2023 18:45
This function returns the data we need for a scrape response regardless
the method that the client is using to communicate with the tracker (UDP or
HTTP).
@josecelano josecelano force-pushed the issue-191-axum-http-tracker-scrape-req-public-mode branch from 3a1285c to ae1a076 Compare February 24, 2023 17:30
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Feb 27, 2023
@josecelano josecelano force-pushed the issue-191-axum-http-tracker-scrape-req-public-mode branch from 43ab216 to 86ce93c Compare February 27, 2023 13:19
@josecelano josecelano marked this pull request as ready for review February 27, 2023 13:47
@josecelano josecelano merged commit 12a42b7 into torrust:develop Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Axum HTTP tracker: scrape request in public mode
1 participant