Rainbows! Rack HTTP server user/dev discussion
 help / Atom feed
From: "Lin Jen-Shin (godfat)" <godfat-hOE/xeEBYYIdnm+yROfE0A@public.gmane.org>
To: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
Cc: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: [PATCH] Match against newer curl.
Date: Wed, 25 Sep 2013 19:00:37 +0800
Message-ID: <CAA2_N1sz6u88qgRWki8sk7p=JWaXgtPvZ7eMpNsKX5wBw+LNuw@mail.gmail.com> (raw)
In-Reply-To: <20130925014657.GA21892-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>

On Wed, Sep 25, 2013 at 9:46 AM, Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org> wrote:
> Lin Jen-Shin <godfat-hOE/xeEBYYIdnm+yROfE0A@public.gmane.org> wrote:
>> My curl 7.32.0 would actually print 400 Bad Request
>> Hope this would make it match against newer or older curl.
>> ---
>>  t/t0045-client_max_header_size.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/t/t0045-client_max_header_size.sh b/t/t0045-client_max_header_size.sh
>> index cd8f1fe..320fe0c 100755
>> --- a/t/t0045-client_max_header_size.sh
>> +++ b/t/t0045-client_max_header_size.sh
>> @@ -60,7 +60,7 @@ t_begin "smallest HTTP/0.9 request works right" && {
>>
>>  t_begin "HTTP/1.1 request fails" && {
>>       curl -vsSf http://$listen/ > $tmp 2>&1 && die "unexpected curl success"
>> -     grep '400$' $tmp
>> +     grep '400\( Bad Request\)\?$' $tmp
>
> I think thse cases should just use "--write-out %{http_code}" instead.
> Theres probably a bunch of places where we should be doing this, really.
> --write-out has been around for at least 10 years, so I think it's safe
> to use.

Great. Just checked it and it worked. What about introducing
http_status() utility function in this case? I could do this.

> Also, I notice this got combined into your EventMachineThread* patch.

Yeah, I haven't written any document as the other concurrency models,
either. Since it seems I did something wrong, and the tests could not
pass completely for some reasons, I chose to send the patch first
anyway :(

Sorry I should have mentioned this.
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


  parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 16:41 Lin Jen-Shin
     [not found] ` <1379004076-69752-1-git-send-email-godfat-hOE/xeEBYYIdnm+yROfE0A@public.gmane.org>
2013-09-25  1:46   ` Eric Wong
     [not found]     ` <20130925014657.GA21892-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2013-09-25 11:00       ` Lin Jen-Shin (godfat) [this message]
     [not found]         ` <CAA2_N1sz6u88qgRWki8sk7p=JWaXgtPvZ7eMpNsKX5wBw+LNuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-25 17:28           ` Eric Wong
     [not found]             ` <20130925172812.GA9181-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2013-09-26 16:46               ` Lin Jen-Shin (godfat)

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://bogomips.org/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA2_N1sz6u88qgRWki8sk7p=JWaXgtPvZ7eMpNsKX5wBw+LNuw@mail.gmail.com' \
    --to=godfat-hoe/xeebyyidnm+yrofe0a@public.gmane.org \
    --cc=normalperson-rMlxZR9MS24@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Rainbows! Rack HTTP server user/dev discussion

Archives are clonable:
	git clone --mirror https://bogomips.org/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.rainbows

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox