【发布时间】:2014-09-24 18:03:02
【问题描述】:
我有 CGI python 程序将 HTML 作为内容(不是 URL)。流程是:
1. open http://jioworld.jioconnect.com/cgi-bin/loginpp.py
2. you get HTML form (since you have not yet login)
3. enter some dummy user and password and submit
4. you stay on same page after submit even though response html is served. So the page (response) is not rendered by browser but cookie is set
5. reload the page (hit refresh/reload)
6. page is rendered
我的问题是:为什么页面没有在第 4 步中呈现,而在重新加载时却在第 6 步中呈现。
我希望第 4 步能够呈现页面。
我已经为所有链接(如样式表、javascript、图像等)尝试了相对的、绝对的 url,但似乎只有绝对的 URL 似乎比其他链接更好。这又是一个问题,因为我也尝试将 html 的 BASE 标记设置为 / 并且它不起作用。图像等解析为 cgi-bin/images 而不是 /images。所以我将 BASE 所有 URL 设置为绝对可能导致 BASE 标记被忽略。因此,我将 BASE 标记也设置为主机的完整 URL。
【问题讨论】: