Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cowboy 0.6.1 support #37

Open
haspadar opened this issue Oct 1, 2012 · 12 comments
Open

Add Cowboy 0.6.1 support #37

haspadar opened this issue Oct 1, 2012 · 12 comments

Comments

@haspadar
Copy link

haspadar commented Oct 1, 2012

See https://github.com/extend/cowboy/blob/master/CHANGELOG.md

@nivertech
Copy link

Cowboy API running fast, it's better to target 0.8.0

@majek
Copy link
Member

majek commented Oct 5, 2012

Bad news: This release drops R14 compatibility. I can't do that.

@majek
Copy link
Member

majek commented Oct 30, 2012

Related: sockjs/sockjs-protocol#57

majek added a commit that referenced this issue Oct 30, 2012
@majek
Copy link
Member

majek commented Oct 30, 2012

cowboy_http_req got renamed to cowboy_req. This is quite bad as changing that would break compatibility with older cowboy. Quick workaround:

$ sed -i 's/cowboy_http_req/cowboy_req/g' src/sockjs_http.erl

@majek majek closed this as completed Oct 30, 2012
@majek majek reopened this Oct 30, 2012
@majek
Copy link
Member

majek commented Oct 30, 2012

Also @yrashk had already done the port: https://github.com/spawngrid/sockjs-erlang/tree/cowboy-master

@yrashk
Copy link
Contributor

yrashk commented Oct 30, 2012

Yep, it's in the testing now but so far it seems to work.

@majek
Copy link
Member

majek commented Oct 30, 2012

@yrashk Are there changes similar to b19ead6 that could be ported to mainline without breaking compatibility with R14 and older cowboy?

@yrashk
Copy link
Contributor

yrashk commented Oct 30, 2012

I have an idea how to do a port that will work for both versions of cowboy, but it is not going to be too pretty.

Basically, we should utilize the dispatching already in place and for old cowboy use {cowboy, Req} and for new cowboy use {cowboy1, Req} (for example). Then you can easily copy over changes from my port line by line and keep both versions.

@majek
Copy link
Member

majek commented Oct 30, 2012

The changes seem to be:

  1. cowboy_http_req -> cowboy_req
  2. new dependency - ranch
  3. instead of cowboy:start_http we have cowboy:start_listener
  4. casing of headers (camelcase vs lowercase) (can you explain this?)
  5. cowboy_req:path vs cowboy_http_req:raw_path

Did I miss anything?

@yrashk
Copy link
Contributor

yrashk commented Oct 30, 2012

  1. vice versa
  2. few return values changed, like body_qs

On Tue, Oct 30, 2012 at 12:32 PM, Marek Majkowski
notifications@github.comwrote:

The changes seem to be:

  1. cowboy_http_req -> cowboy_req
  2. new dependency - ranch
  3. instead of cowboy:start_http we have cowboy:start_listener
  4. casing of headers (camelcase vs lowercase) (can you explain this?)
  5. cowboy_req:path vs cowboy_http_req:raw_path

Did I miss anything?


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-9919762.

@majek
Copy link
Member

majek commented Oct 30, 2012

@yrashk I've noticed you forked master branch, not dev, therefore sockjs-protocol-dev.py fails in few more places. Could you take a look? I don't think there are many changes included on dev.

@yrashk
Copy link
Contributor

yrashk commented Oct 30, 2012

I am trying to understand what changes at
master...dev are important

On Tue, Oct 30, 2012 at 1:06 PM, Marek Majkowski
notifications@github.comwrote:

@yrashk https://github.com/yrashk I've noticed you forked masterbranch, not
dev, therefore sockjs-protocol-dev.py fails in few more places. Could you
take a look? I don't think there are many changes included on dev.


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-9920835.

majek added a commit that referenced this issue Dec 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants