﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1849	http-client: with-input-from-request fails when uri-or-request is an intarweb request	Pietro Cerutti		"{{{
(import (chicken io) (intarweb) (http-client))
(let ((req (make-request uri: ""https://google.com"")))
  (with-input-from-request req #f read-string))
}}}

{{{
Error: (call-with-input-request) The first argument must be either an uri-common object, an intarweb request object, or an URI string
#<intarweb#request>
#f
#<procedure (f6040 p10826038 r10836039)>

        Call history:

        <syntax>          (##core#begin (with-input-from-request req #f read-string))
        simple-req.scm:3          (with-input-from-request req #f read-string)
        simple-req.scm:2          (make-request #:uri ""https://google.com"")
        simple-req.scm:2          (make-request #:uri ""https://google.com"")
        simple-req.scm:3          (with-input-from-request req #f read-string)
        http-client.scm:903: call-with-input-request*     
        http-client.scm:803: uri-common#uri-reference?    
        http-client.scm:805: intarweb#request?    
        http-client.scm:805: intarweb#request-uri         
        http-client.scm:807: uri-common#uri?      
        http-client.scm:810: uri-common#uri-reference?    
        http-client.scm:808: http-client-error    
        http-client.scm:344: chicken.condition#make-property-condition    
        http-client.scm:345: chicken.condition#make-property-condition    
        http-client.scm:343: chicken.condition#make-composite-condition   
        http-client.scm:343: srfi-18#raise              <--
}}}


Here, we take the request-uri out of the intarweb request. That results in a string. Two lines below, we expect it to be an uri and we fail.

https://code.call-cc.org/cgi-bin/gitweb.cgi?p=eggs-5-latest.git;a=blob;f=http-client/1.2.2/http-client.scm;h=58d045d661cdae7924afe4983f24dfb822d49dc3;hb=HEAD#l805

"	defect	new	major	someday	extensions	5.3.0		http-client		easy
