svg broken !

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

svg broken !

shahzaib mushtaq
Hi,

We've setup Nginx as Edge node. Website is running fine from edge (caching & proxying requests to origin as required) . However, proxying requests for .svg showing the following error while origin ndoe loads it fine.


Mime-type is also configured in nginx for svg on edge side but issue still persists:

image/svg+xml                         svg svgz;

Here is the directive for svg:


===========================
Thanks in advance. 


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: svg broken !

Francis Daly
On Wed, Mar 25, 2020 at 07:50:34PM +0500, shahzaib mushtaq wrote:

Hi there,

> We've setup Nginx as Edge node. Website is running fine from edge (caching
> & proxying requests to origin as required) . However, proxying requests for
> .svg showing the following error while origin ndoe loads it fine.

What is the difference in the output between requests like

  curl -i http://nginx-server/example.svg

and

  curl -i http://origin-server/example.svg

?

That difference might hint where the problem is caused.

        f
--
Francis Daly        [hidden email]
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: svg broken !

shahzaib mushtaq
From ORIGIN (WORKING)
https://i.imgur.com/4EJ8VfM.png

From Edge (Broken SVG)
https://i.imgur.com/MZ6HAsU.png  

On Fri, Mar 27, 2020 at 1:34 PM Francis Daly <[hidden email]> wrote:
On Wed, Mar 25, 2020 at 07:50:34PM +0500, shahzaib mushtaq wrote:

Hi there,

> We've setup Nginx as Edge node. Website is running fine from edge (caching
> & proxying requests to origin as required) . However, proxying requests for
> .svg showing the following error while origin ndoe loads it fine.

What is the difference in the output between requests like

  curl -i http://nginx-server/example.svg

and

  curl -i http://origin-server/example.svg

?

That difference might hint where the problem is caused.

        f
--
Francis Daly        [hidden email]
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: svg broken !

Francis Daly
On Fri, Mar 27, 2020 at 02:32:07PM +0500, shahzaib mushtaq wrote:

Hi there,

> From ORIGIN (WORKING)
> https://i.imgur.com/4EJ8VfM.png
>
> From Edge (Broken SVG)
> https://i.imgur.com/MZ6HAsU.png

Could you include the words as words, rather than as a link to a picture
of words?

That will make it much easier to copy-paste and "diff" the output,
to see what is different in the two responses.

And then your browser manual may describe what input it expects, so that
the "wrong" output can be examined to see what the browser wants that
is not there.

(Presumably -- it will be one of the things that is different between the
"good" and the "bad" responses.)

Cheers,

        f
--
Francis Daly        [hidden email]
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: svg broken !

shahzaib mushtaq
PLease check this:


On Fri, Mar 27, 2020 at 8:31 PM Francis Daly <[hidden email]> wrote:
On Fri, Mar 27, 2020 at 02:32:07PM +0500, shahzaib mushtaq wrote:

Hi there,

> From ORIGIN (WORKING)
> https://i.imgur.com/4EJ8VfM.png
>
> From Edge (Broken SVG)
> https://i.imgur.com/MZ6HAsU.png

Could you include the words as words, rather than as a link to a picture
of words?

That will make it much easier to copy-paste and "diff" the output,
to see what is different in the two responses.

And then your browser manual may describe what input it expects, so that
the "wrong" output can be examined to see what the browser wants that
is not there.

(Presumably -- it will be one of the things that is different between the
"good" and the "bad" responses.)

Cheers,

        f
--
Francis Daly        [hidden email]
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: svg broken !

Francis Daly
On Mon, Mar 30, 2020 at 01:31:02PM +0500, shahzaib mushtaq wrote:

Hi there,

> PLease check this:
>
> https://pastebin.com/VZKHrM1u

So, as I understand things:

* the report is that your particular client acts the way you want it
to when it requests the svg url from the "upstream" (origin) web server
directly
* your particular client does not act the way you want it to when it
requests the equivalent svg url from the "edge" (nginx reverse proxy)
web server

The presumption is that this is the result of one single http request.

The intention now is to capture the responses to the two requests (to
origin and to edge) that the client makes, and to compare them to see
what is different. And then to see if those differences should affect
what the client does.

This "pastebin" link shows the "origin" response being HTTP/1.1, and the
"edge" response being HTTP/2.

The previous "imgur" links show the "origin" response and the "edge"
response both being HTTP/1.1.

Can you do whatever it takes to make the same request to both servers,
that matches what your client does, and copy-paste the full response
into the email?

Possibly "curl -i --http1.1" can mimic the client more closely?

If the response body is the 210 bytes shown in an earlier imgur link,
then just pasting it twice to confirm that nothing changed, should not
be a problem.


From the first sets of data, I do see that the nginx response does not
include a Content-Length header, where the origin response does. And the
nginx response includes two Strict-Transport-Security headers, where
the origin response includes just the one. The two responses seem to
have different Cache-Control headers as well.

There are other differences, which you can see better than I can since
you have access to the extra data.

Does your client care about Content-Length? Or duplicate
Strict-Transport-Security headers?

Or it the error-output-picture due to the missing "xlink" namespace in
the svg file?

(That latter should not be the case, if you are using the same client to
access both urls -- it should be getting the same content in both cases.)

You may want to investigate why your nginx is sending duplicate headers.

Good luck with it,

        f
--
Francis Daly        [hidden email]
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx