Giter Club home page Giter Club logo

Comments (6)

bvanderveen avatar bvanderveen commented on July 23, 2024

Hey Kevin,

Thanks for the report! Sorry for the delayed response! It seems like GitHub doesn't send me emails for issues opened on repos under the kayak org. Need to get that sorted out.

I'll take a look at this code this week. Full-disclosure—I haven't tested on Mono at all, and there might be some differences in the behavior of the System.Net.Sockets.Socket implementation. Needless to say this might be causing some weirdness with the way connections get accepted.

Hm, yes, I do actually have an idea about what might be causing this…

Best,
Benjamin

from kayak.

bvanderveen avatar bvanderveen commented on July 23, 2024

Ah yes, looking closer I was actually seeing this issue in .NET as well. Should be fixed in the latest master. I'll push a bumped NuGet tonight or tomorrow.

Oh and also, I think I've set things up so that I'll get notifications for kayak/kayak, so hopefully I won't miss any more…

from kayak.

kjohnphillip avatar kjohnphillip commented on July 23, 2024

Hi Benjamin,

thanks for looking into this. I'll grab the latest version and retest. FWIW, I updated the demo application to use the latest Gate.Kayak assembly with Kayak 0.6.2 and this also seems to have resolved the issue.

I'm developing primarily on mono/Ubuntu at the moment so I'll let you know if any further behaviour differences show up.

Best,
Kevin

from kayak.

kjohnphillip avatar kjohnphillip commented on July 23, 2024

Hi Benjamin,

I've done some further testing after upgrading to kayak's master branch.

The sample application has been updated to demonstrate a potential problem when POSTing JSON data as per the HTTP request below.

POST /Post HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Referer: http://127.0.0.1:8080
Content-Length: 25
Origin: http://127.0.0.1:8080
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.803.0 Safari/535.1
Content-Type: application/json
Accept: /
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

{"data":"some json data"}

This time Gate.Utils.Body.ToText never returns the data from reading the request body. Can you confirm whether this is indeed an issue?

Regards,

Kevin

from kayak.

bvanderveen avatar bvanderveen commented on July 23, 2024

Ah yeah, don't use anything in Gate.Utils on Kayak; it assumes a
multithreaded host. See this approach:

https://github.com/kayak/kayak/blob/master/KayakExamples/Program.cs#L177

On Thu, Jul 21, 2011 at 7:11 AM, kjohnphillip <
[email protected]>wrote:

Hi Benjamin,

I've done some further testing after upgrading to kayak's master branch.

The sample application has been updated to demonstrate a potential problem
when POSTing JSON data as per the HTTP request below.

POST /Post HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Referer: http://127.0.0.1:8080
Content-Length: 25
Origin: http://127.0.0.1:8080
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like
Gecko) Chrome/14.0.803.0 Safari/535.1
Content-Type: application/json
Accept: /
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

{"data":"some json data"}

This time Gate.Utils.Body.ToText never returns the data from reading the
request body. Can you confirm whether this is indeed an issue?

Regards,

Kevin

Reply to this email directly or view it on GitHub:
#9 (comment)

from kayak.

kjohnphillip avatar kjohnphillip commented on July 23, 2024

Thanks Benjamin - I've confirmed this to be working using the example approach instead.

Best,
Kevin

from kayak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.