Closed inf1k closed 4 years ago
I'll get that fixed this weekend.
I think you know more C than you let on. Your suggestion was exactly correct. I also updated a few other places where it made sense not to be check the case. The branch is case-insensitive-headers
. Let me know if it works for you and I make a release.
At first look, it works. Thanks!
Great, I'll release today.
Hello! Seems that Content-Type presence check in
gqleval.c
is not case insensitive.Version v2.12.3 Steps to reproduce is simple, using
example/graphql/hello.rb
This will respond with:
According to RFC 7230:
https://github.com/ohler55/agoo/blob/develop/ext/agoo/gqleval.c#L550 https://github.com/ohler55/agoo/blob/develop/ext/agoo/req.c#L141
I've tried to fix this issue with including
strings.h
and replacingstrncmp
withstrncasecmp
inreq.c
file, so, whenever header value will be taken with this function, it will search case-insensitive. At first look it works. But I have no such experience with C, ruby extensions, and agoo source code to allow myself to submit PR with this changes.Regards, Alex.