Custom Query (1630 matches)
Results (76 - 78 of 1630)
Ticket
|
Resolution
|
Summary
|
Owner
|
Reporter
|
#1082 |
fixed
|
A paste that makes pastiche hang
|
|
Mario Domenech Goulart
|
Description |
Attached you can find a file (make-check.out) that, when pasted into pastiche, makes it hang when requested.
Steps to reproduce:
- create a new paste in pastiche with the contents of make-check.out (copy it and paste ot into pastiche's "Your paste" textarea)
- view the paste created with make-check.out contents
|
#1392 |
fixed
|
Ability to customise http-client headers for each request
|
sjamaan
|
Caolan McMahon
|
Description |
I propose adding a (prepare-request) parameter to the http-client egg. This allows me to add etag and if-modified-since headers to all (even redirected) requests made by http-client, based on the current request URI.
-
|
|
|
43 | 43 | basic-authenticator digest-authenticator |
44 | 44 | determine-username/password determine-proxy |
45 | 45 | determine-proxy-from-environment determine-proxy-username/password |
46 | | server-connector default-server-connector) |
| 46 | server-connector default-server-connector |
| 47 | prepare-request default-prepare-request) |
47 | 48 | |
48 | 49 | (import chicken scheme lolevel) |
49 | 50 | (use srfi-1 srfi-13 srfi-18 srfi-69 |
… |
… |
|
333 | 334 | (when (> (read-string! (string-length buf) buf port) 0) |
334 | 335 | (loop #f))))))) |
335 | 336 | |
336 | | (define (add-headers req) |
| 337 | (define (default-prepare-request req) |
337 | 338 | (let* ((uri (request-uri req)) |
338 | 339 | (cookies (get-cookies-for-uri (request-uri req))) |
339 | 340 | (h `(,@(if (not (null? cookies)) `((cookie . ,cookies)) '()) |
340 | | (host ,(cons (uri-host uri) (and (not (uri-default-port? uri)) |
341 | | (uri-port uri)))) |
342 | 341 | ,@(if (and (client-software) (not (null? (client-software)))) |
343 | 342 | `((user-agent ,(client-software))) |
344 | 343 | '())))) |
… |
… |
|
345 | 344 | (update-request req |
346 | 345 | headers: (headers h (request-headers req))))) |
347 | 346 | |
| 347 | (define prepare-request (make-parameter default-prepare-request)) |
| 348 | |
348 | 349 | (define (http-client-error loc msg args specific . rest) |
349 | 350 | (raise (make-composite-condition |
350 | 351 | (make-property-condition 'exn 'location loc 'message msg 'arguments args) |
… |
… |
|
587 | 588 | (let* ((uri (request-uri req)) |
588 | 589 | (con (ensure-connection! uri))) |
589 | 590 | (condition-case |
590 | | (let* ((req (add-headers (update-request |
591 | | req port: (http-connection-outport con)))) |
| 591 | (let* ((req ((prepare-request) |
| 592 | (update-request |
| 593 | req |
| 594 | headers: (headers |
| 595 | `((host ,(cons (uri-host uri) |
| 596 | (and (not (uri-default-port? uri)) |
| 597 | (uri-port uri))))) |
| 598 | (request-headers req)) |
| 599 | port: (http-connection-outport con)))) |
592 | 600 | ;; No outgoing URIs should ever contain credentials or fragments |
593 | 601 | (req-uri (update-uri uri fragment: #f username: #f password: #f)) |
594 | 602 | ;; RFC1945, 5.1.2: "The absoluteURI form is only allowed |
|
#812 |
wontfix
|
Add ->list and ->boolean to core system
|
felix winkelmann
|
felix winkelmann
|
Description |
These appear again and again in user code and can be trivially rewritten to efficient code. What (->list '()) should return is not clear to me, though.
|
Note: See
TracQuery
for help on using queries.