zevarito / mixpanel

Simple lib to track events in Mixpanel service. It can be used in any rack based framework.
MIT License
273 stars 84 forks source link

Update to documentation for better web server compatibility #60

Closed friesencr closed 11 years ago

friesencr commented 11 years ago

Our webserver was filtering the SKIP_MIXPANEL_MIDDLEWARE header. If you sub the underscores for hyphons it works much better.

zevarito commented 11 years ago

@friesencr that's cool, can you check test suite and update documentation also? Thanks.

zevarito commented 11 years ago

Oh, I was confused, thanks.

zevarito commented 11 years ago

OK, got confused here, I am just seeing a documentation diff. Did you push --force leaving original changes out?

I've patched source to reflect those changes and pushed to master, credit is for you, thank for notice it.

friesencr commented 11 years ago

It looks like rack will perform some transposing magic and make Skip-Mixpanel-Middleware = HTTP_SKIP_MIXPANEL_MIDDLEWARE. However nginx will filter out SKIP_MIXPANEL_MIDDLEWARE but leave Skip-Mixpanel-Middleware.

friesencr commented 11 years ago

You shouldn't have to change your source code just have people use the hyphenated version.

zevarito commented 11 years ago

On Wed, Dec 12, 2012 at 7:11 PM, Chris Friesen notifications@github.comwrote:

You shouldn't have to change your source code just have people use the hyphenated version.

I just did. Do you think is worth to come back to the old code?

— Reply to this email directly or view it on GitHubhttps://github.com/zevarito/mixpanel/pull/60#issuecomment-11309634.

Alvaro

friesencr commented 11 years ago

Your current code is broken unless rack adds 'HTTP_'. I commented on https://github.com/zevarito/mixpanel/commit/4d86f62148ac51ee3b3c78f361689470c6c8d7d5

zevarito commented 11 years ago

@friesencr thanks, I'll revert the whole commit.