oracle apply handler,做什么BaseHandler.apply_response_修复在django吗?
我使用pdb逐步完成django請求/響應循環,以調試重定向被損壞的問題。在
在響應(link to django source)的最后階段,我已經過了中間件的應用程序,現在我已經到了調用BaseHandler.apply_response_fixes(request,response)的地方,它擾亂了我的重定向頭:
前面的標題(Pdb) response._headers
{'x-frame-options': ('X-Frame-Options', 'SAMEORIGIN'),
'content-type': ('Content-Type', 'application/octet-stream'),
'location':'http://localhost:9000/6/result//blogs/',
'server': ('Server', 'WSGIServer/0.2 CPython/3.4.3')}
現在我做下一步:
^{pr2}$
現在在我的位置標題中有一個雜散的t:
后面的標題(Pdb) response._headers
{'x-frame-options': ('X-Frame-Options', 'SAMEORIGIN'),
'content-type': ('Content-Type', 'application/octet-stream'),
'location': ('Location', 'http://localhost:9000/6/result//blogs/t'),
'server': ('Server', 'WSGIServer/0.2 CPython/3.4.3')}
BaseHandler.apply_response_fixes(request,response)看起來很天真:response_fixes = [
http.conditional_content_removal,
]
def apply_response_fixes(self, request, response):
"""
Applies each of the functions in self.response_fixes to the request and
response, modifying the response in the process. Returns the new
response.
"""
for func in self.response_fixes:
response = func(request, response)
return response
這是怎么回事?BaseHandler.apply_response_fixes(request, response)做什么?在
我怎樣才能避開這個問題?在
總結
以上是生活随笔為你收集整理的oracle apply handler,做什么BaseHandler.apply_response_修复在django吗?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php判断base64编码,检测PHP中
- 下一篇: linux内核配置失败,petalinu