开发者

ASP classic illogical behavior: request variables are empty if include doesn't flush

i have 2 files: a.asp, inc.asp

a.asp includes inc.asp in somewhere in the beginning. inc.asp retrieves variables from the request e.g. z = request("z"). after that, i must write somewhere "response.flush". if the response.flush command doesn't comes AFTER that code somewhere, then the variables (e.g. z), are empty!.

this is totally weird. why there must be a flush?

why the code before the flush changes its behavior ??? how does it "know" there's going to be a flush?!!?

  • i couldn't reproduce it with a code sample, i'll try to put here the code itself, but it's quite big.
  • IIS version: probably 3-4 years old. how can I see the version on the remote, shared server (no remote "control panel")
  • i already have a workaround, so it's purely curiosity for now.

EDIT: 2011-02-27 I no longer have a开发者_开发问答ccess to that code, and i lost interest in solving it anyway.

i thank the commenters so far.


Also, I have noticed in past that using generic "request" collection can cause problems. Please try and use request.querystring("z") or request.form("z") depending on your application usage. One thing that tripped me when using request("ID") was when I had a cookie named ID and also had querystring for ID.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜