[NUnitAsp-devl] Re: FW: NUnitAsp speed bump
Brought to you by:
jlittle82
From: Brian K. <brk...@ya...> - 2002-03-29 05:56:08
|
> From: Jim Little [mailto:jl...@cu...] Sent: Thursday, March 28, 2002 12:38 PM > Well, that > real-world test found a problem. A BIG problem. > Until we fix it, NUnitAsp > won't be suitable for testing non-trivial ASP.net > pages. Damn. Here I had my hopes up that you had magically transformed my pumpkin into a carriage. > EnterInputData turns around and calls > _client.Headers.Remove and > _client.Headers.Add. Those methods check to see if > the name has a colon, > and if it does, they throw an exception. A colon is > an illegal value in a > name. (I want to kill Microsoft for using a colon. > What were they > thinking??) This is bad news. I was hoping they had fixed the HttpEncoding bug with this class. It turns out they did, but now it's just as bad because of the colon. Can't win with these guys. > Mike and I spent all morning trying to figure out a > workaround for this > problem. We tried bypassing the illegal character > check in > WebHeadersCollection a number of sneaky (and > kludgey) ways... no luck. You might of tried this already, but here goes... The Browser class submits the form using the WebClient.UploadValues method. The signature accepts a NameValueCollection for the values, not a WebHeadersCollection (which extends NameValueCollection), thus we don't need to use the WebClient.Headers collection to manage our parameters. We could implement our own WebHeadersCollectionColonFix (aka: FiberCollection?) which gracefully handles names with colons by not HttpEncoding them or something. This way we could avoid the option below. > At > this point, I think that the cleanest way to solve > this problem will > probably be for us implement our own version of > WebClient. That may not be > as bad as it sounds since we don't need to be as > general-purpose as > WebClient is. Yes this is an alternative, however it immediately adds to the complexity of the project. Perhaps I'm overstating, but I was hoping to avoid this if possible. I suppose, however, WebClient doesn't do a whole hell of a lot anyway. > Other than this "minor" issue, NUnitAsp is looking > very good. That's good. > It's not > quite ready to be put in CVS, yet, as there's some > directory structure > issues that need to be resolved. I've zipped up the > project files and will > go ahead and email them to Brian in a separate > email. I'll look at adding them next week. Thanks for the good work on this Jim and Mike! I think we now have a good beginning from which to get a release going. -Brian __________________________________________________ Do You Yahoo!? Yahoo! Greetings - send holiday greetings for Easter, Passover http://greetings.yahoo.com/ |