Opened 15 years ago

Closed 15 years ago

Last modified 10 years ago

#171 closed Enhancement (fixed)

HTTP_STATUS_FAIL fine grannularity when scraping

Reported by: oleo Owned by: somebody
Priority: Normal Milestone: Sometime
Component: libtransmission Version: Other
Severity: Normal Keywords: scrape trunk r1152
Cc:

Description

After experincing miltiple retries on tracker which do not support scraping I've found that this should be checked by response code 4xx. I suggest fine granularity of HTTP_STATUS_FAIL response codes from

#define TR_HTTP_STATUS_FAIL( st )         ( 400 <= (st) && 599 >= (st) )

to

#define TR_HTTP_STATUS_FAIL( st )         ( 400 <= (st) && 599 >= (st) )
#define TR_HTTP_STATUS_FAIL_CLIENT( st )  ( 400 <= (st) && 499 >= (st) )
#define TR_HTTP_STATUS_FAIL_SERVER( st )  ( 500 <= (st) && 599 >= (st) )

The purpose if this check is to disable further tracker scraping if tracker responds that scraping is not available. Temporary server fail codes 5xx will not disable scraping if one fails.

Patch attached. See http://www.w3.org/Protocols/HTTP/HTRESP.html and http://wiki.theory.org/BitTorrentSpecification#Tracker_.27scrape.27_Convention

Detailed log before change in transmission daemon:

Dec  7 12:11:57 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 12:21:57 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 12:35:09 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 12:45:09 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 12:55:11 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 13:05:11 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 13:15:12 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 13:25:12 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 13:35:09 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 13:45:39 transmissiond[27618]: Scrape: invalid HTTP status code: 404
Dec  7 13:55:40 transmissiond[27618]: Scrape: invalid HTTP status code: 404

shows that scrape is reported every 5 or 10 minutes. After patch applied, scrape error 4xx is reported only once as further tracker scraping is useless as it is not supported. Log:

Dec  7 14:55:02 transmissiond[9165]: Transmission daemon 0.7-svn (1152) started - http://transmission.m0k.org/
Dec  7 15:00:04 transmissiond[9165]: Scrape: invalid HTTP status code: 404

Attachments (1)

scrape_fail.patch (1.6 KB) - added by oleo 15 years ago.
This patch disables further torrent scraping if received 4xx response code

Download all attachments as: .zip

Change History (3)

Changed 15 years ago by oleo

This patch disables further torrent scraping if received 4xx response code

comment:1 Changed 15 years ago by livings124

  • Resolution set to fixed
  • Status changed from new to closed

Done in [1167]

comment:2 Changed 10 years ago by jordan

  • Component changed from Transmission to libtransmission
Note: See TracTickets for help on using tickets.