dongqun9403 2014-09-08 19:30
浏览 52
已采纳

Gorilla / Martini会话在Cloud9 IDE环境中不起作用

I've been experimenting with Go web application development in the Cloud9 IDE environment. So far I've had no success with using Gorilla sessions (which are also the underlying mechanism for sessions in the Martini web framework). However, the exact same code DOES work successfully in any other environment.

To reproduce the issue, you can cut-n-paste the exact "Hello World" style example app from the Martini sessions add-on (see here). In this simple example, the "/set" URL places a value on the session, and the "/get" URL displays the value that was previously set.

In a Cloud9 IDE project, calling the "/get" URL logs the following to the console:

[martini] [sessions] ERROR! illegal base64 data at input byte 155

I get similar results when trying to test Gorilla directly. However, when running any of this exact same source code, unmodified, in my local environment (or in a Nitrous.IO cloud environment), it works just fine.

Is anyone doing Go web development on Cloud9, and have any insights into this issue? Thanks!

  • 写回答

1条回答 默认 最新

  • doushouj966020 2014-09-11 09:58
    关注

    It turned out that our (Cloud9) application proxy does not encode all cookies properly. We have a fix for that, which should go live very soon.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝