connect-owin icon indicating copy to clipboard operation
connect-owin copied to clipboard

Static Files being trimmed

Open jchannon opened this issue 10 years ago • 6 comments

Hi,

I've been testing this today and have found an odd issue with static files being trimmed.

I create a 2mb js file and when requested it only returned 1.6mb

I ran it through express and it returned all of it. I created a separate .Net app using the UseStaticFiles middleware and that returned it all so my assumption is connect-owin is trimming somewhere.

Any ideas?

jchannon avatar Mar 13 '15 17:03 jchannon

I couldn't reproduce your problem. Can you tell me what version of the following components you are using :

  • nodejs
  • expressjs
  • connect-owin
  • Microsoft.Owin
  • Microsoft.Owin.StaticFiles

bbaia avatar Mar 16 '15 04:03 bbaia

I'll get those over in about 90mins. I was running node on Linux so not sure if that's a factor

On Monday, 16 March 2015, Bruno Baia [email protected] wrote:

I couldn't reproduce your problem. Can you tell me what version of the following components you are using :

  • nodejs
  • expressjs
  • connect-owin
  • Microsoft.Owin
  • Microsoft.Owin.StaticFiles

Reply to this email directly or view it on GitHub https://github.com/bbaia/connect-owin/issues/4#issuecomment-81405938.

jchannon avatar Mar 16 '15 08:03 jchannon

Here's a reproduction of the issue here https://github.com/jchannon/connectowinrepro

Its using latest .net components

Node = 0.10.25 Express = 4.12.2 Connect-Owin = 0.3.0

jchannon avatar Mar 16 '15 09:03 jchannon

If you make a request to http://localhost:3000/static/lib.js you'll see the file is trimmed

jchannon avatar Mar 16 '15 09:03 jchannon

In server.js file, if you comment the connect-owin middleware and configure the express static middleware like this :

app.use(express.static(__dirname));

You'll get the same problem.

The F12 panel indicates a 1.6mb file and the content is trimmed in the content panel, but if you download the source, the file is OK...

bbaia avatar Mar 19 '15 12:03 bbaia

I didn't see that but will try again.

It first came about when an angular client was requesting the js file and it failed to initialise the angular app as it appeared the file was trimmed

jchannon avatar Mar 19 '15 13:03 jchannon