HTTP 请求的 Gzip 压缩

发布于 2024-09-07 11:45:08 字数 127 浏览 4 评论 0原文

有没有办法让浏览器和/或 Silverlight 应用程序对 HTTP 请求进行 GZIP 压缩?不要与 HTTP 响应的 GZIP 压缩混淆 - 我知道如何在服务器端进行设置。我需要的是压缩请求,并且协议允许 - 有人使用它吗?配置技巧?

Is there any way to make browsers &/or Silverlight application do a GZIP compression of HTTP requests? Don't confuse with GZIP compression of HTTP responses - I know how to set this up on the server side. What I need is to compress requests as well, and protocol allows that - anybody using it? Configuration tips?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

酸甜透明夹心 2024-09-14 11:45:30

有一个 MSDN 示例描述了如何制作 WCF 自定义消息编码器:压缩编码器。还没有尝试过,但它可能会提供一些想法。 http://msdn.microsoft.com/en-us/library/ms751458.aspx

There is an MSDN sample that describes how to make a WCF Custom Message Encoder: Compression Encoder. Have not tried this yet, but it may give some ideas. http://msdn.microsoft.com/en-us/library/ms751458.aspx

旧情勿念 2024-09-14 11:45:27

除非您是这些网站和 silverlight 应用程序的作者,否则您无法制作它们。压缩 http 请求没有标准。您可以设置您的服务器来支持它并将其记录在您的 api 中,这是您能做的最好的事情。

如果您在 silverlight 应用程序中使用 WCF,则可以使用编码器压缩消息。但这又是不可发现的,必须记录下来。

You cannot make them unless you are the author of these websites and silverlight applications. There is no standard for a compressed http request. You can setup your server to support it and document it in your api and that is the best you can do.

If your using WCF in the silverlight application you can compress the message with an encoder. But again this is not discoverable and must be documented.

岁月蹉跎了容颜 2024-09-14 11:45:25

据我所知,gzip只是HTTP 1.1标准的一部分,用于响应,而不是用于请求数据。

如果您发布大量数据,则需要压缩请求,在这种情况下,您可以在客户端应用程序中压缩数据(例如,在您标记问题的 silverlight 中),并将其作为字节数组发送/溪流。

然后在接收端解压数据。

As far as I know, gzip is only a part of the HTTP 1.1 standard for responses, not for request data.

The need for compressing requests would be if you post a lot of data, and in that case you can compress your data in the client application (eg. in silverlight which you have tagged your question with), and send it over as a byte array/stream.

Then decompress the data on the receiving end.

遇到 2024-09-14 11:45:22

HTTP 请求可以包含实体标头,其中包括内容编码:
http://www.w3.org/...

一个名叫 Morten Nielsen 的人已经完成了 HTTP 请求压缩Windows Phone 中的 Silverlight,博客文章:
http://www.sharpgis.net/...

HTTP Request can contain entity-headers, which includes Content-Encoding:
http://www.w3.org/...

A guy named Morten Nielsen has done HTTP request compression for Silverlight in Windows Phone, blog post:
http://www.sharpgis.net/...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文