Passenger新版本request_uri header自动转码的问题

Posted by HoLin on January 21st, 2010 filed in 部署与优化

Nginx access.log :

127.0.0.1 - - [21/Jan/2010:21:13:58 +0800] “GET /notes/Books+%2B+Online+Video+%3D+Vooks%3A+Watchable%2C+Readable%2C+%26+Very+Cool HTTP/1.1″ 304 0 “-” “Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7″

到Rails之后log/production.log:

Completed in 123ms (View: 8, DB: 62) | 200 OK [http://i/notes/Books+++Online+Video+=+Vooks:+Watchable,+Readable,+&+Very+Cool]

url被自动decode了,在我们的项目中并不想要这样的结果。

网上查了很多资料,Apache版本有类似 AllowEncodedSlashes 的指令。Nginx暂时没有。

对比了passenger-2.2.4和passenger-2.2.9,在文件ext/nginx/Configuration.c中有一行代码和这个相关。
2.2.9:

DEFINE_VAR_TO_PASS(”REQUEST_URI”, “$uri$is_args$args”);

2.2.4

DEFINE_VAR_TO_PASS(”REQUEST_URI”, “$request_uri”);

用2.2.4的替换2.2.9的,重新编译就可以了。

No related posts.


47 Responses to “Passenger新版本request_uri header自动转码的问题”

  1. GABRIEL Says:


    Medicamentspot.com. Canadian Health&Care.No prescription online pharmacy.Best quality drugs.Special Internet Prices. No prescription pills. Buy pills online

    Buy:Lumigan.Zyban.Petcam (Metacam) Oral Suspension.Nexium.Mega Hoodia.Valtrex.Zovirax.Accutane.Synthroid.Arimidex.Actos.100% Pure Okinawan Coral Calcium.Retin-A.Prednisolone.Human Growth Hormone.Prevacid….

  2. CURTIS Says:

    buy viagra canada

    Buygeneric drugs…

  3. COREY Says:

    Cialis UK

    Buynow it…

  4. ARMANDO Says:

    abilify and siezures

    Buynow…

  5. DAVE Says:

    Accutane@official.site” rel=”nofollow”>.

    Buywithout prescription…

  6. LYNN Says:

    aggrenox@1.now” rel=”nofollow”>.

    Buygeneric meds…

  7. JOSHUA Says:

    Aldactone@official.site” rel=”nofollow”>.

    Buygeneric drugs…

  8. CLAYTON Says:

    cost@of.alesse” rel=”nofollow”>..

    Buyit now…

  9. FREDDIE Says:

    cipro@250.mg” rel=”nofollow”>..

    Buygeneric meds…

  10. JULIAN Says:

    abilify@anxiety.now” rel=”nofollow”>.

    Buygeneric drugs…

  11. LEE Says:

    i@am.pregnant.how.often.can.i.take.25mg.of.phenergan.safely” rel=”nofollow”>…

    Buygeneric drugs…

  12. JAVIER Says:

    Zyrtec@official.site” rel=”nofollow”>…

    Buyno prescription…

  13. JASON Says:

    zofran odt

    Buynow it…

  14. SHAWN Says:

    Clindamycin

    Buywithout prescription…

  15. SHAWN Says:

    Xalatan

    Buywithout prescription…

  16. LEWIS Says:

    zantac renal dosing

    Buygeneric meds…

  17. DAVE Says:

    Zyrtec

    Buyno prescription…

  18. ANTHONY Says:

    buy liposomal lidocaine 4% cream maxilene

    Buywithout prescription…

  19. ORLANDO Says:

    Zoloft

    Buyit now…

  20. JULIO Says:

    zyrtec anticolinergici effect

    Buyno prescription…

  21. JONATHAN Says:

    can you take zoloft and blood pressure medication together

    Buynow…

  22. CALVIN Says:

    gilbert’s syndrome tylenol

    Buygeneric meds…

  23. ADAM Says:

    Zyrtec

    Buygeneric meds…

  24. JEREMIAH Says:

    Pyridium

    Buygeneric drugs…

  25. BRYAN Says:

    side effect of zoloft

    Buyno prescription…

  26. MIGUEL Says:

    stopped taking prozac realized i like him

    Buygeneric drugs…

  27. DOUG Says:

    dermatological side effects of rogaine

    Buywithout prescription…

  28. JEFF Says:

    Prozac

    Buynow it…

  29. PETER Says:

    provera 10 days perimenopause

    Buygeneric drugs…

  30. JIMMY Says:

    Pyrantel Pamoate

    Buygeneric meds…

  31. STEVEN Says:

    Retin A

    Buygeneric meds…

  32. MATTHEW Says:

    Tetracycline@Tetracycline.Tetracycline” rel=”nofollow”>…

    Buyno prescription…

  33. CARLOS Says:

    Yaz

    Buygeneric pills…

  34. KARL Says:

    Cymbalta@Cymbalta.Cymbalta” rel=”nofollow”>.

    Buyit now…

  35. WENDELL Says:

    Coreg@Coreg.Coreg” rel=”nofollow”>…

    Buywithout prescription…

  36. JEREMY Says:

    Claritin@Claritin.Claritin” rel=”nofollow”>..

    Buyit now…

  37. RON Says:

    38@year.old.male.prinivil.review” rel=”nofollow”>…

    Buygeneric drugs…

  38. CLAUDE Says:

    ..

    Buygeneric drugs…

  39. DALE Says:

    Buydrugs without prescription…

  40. EUGENE Says:

    dried@neem.leaves” rel=”nofollow”>…

    Buywithout prescription…

  41. KEITH Says:

    crestor@statin.drugs” rel=”nofollow”>…

    Buyit now…

  42. ROBERT Says:

    man@plan.a.and.b” rel=”nofollow”>..

    Buygeneric drugs…

  43. ELMER Says:

    Buygeneric pills…

  44. RICKY Says:

    .

    Buygeneric drugs…

  45. WESLEY Says:

    methotrexate@and.placenta.acretia” rel=”nofollow”>.

    Buygeneric drugs…

  46. EDDIE Says:

    motrin@for.61.pounds” rel=”nofollow”>…

    Buygeneric meds…

  47. NICK Says:

    .

    Buyno prescription…

Leave a Comment