profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/NeoLegends/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

Alxandr/SpotiFire 40

A project to make a SpotifyClient in C#

NeoLegends/dom-flip 8

🔀 Smooth position animation for web components.

NeoLegends/AsyncLinq 5

A collection of extension methods providing support for TPL tasks in LINQ-to-Objects. See

Festify/oauth-authorizator 4

A Polymer 2.0 element that performs the OAuth authorization code flow.

NeoLegends/ellipse 2

Truncate strings in a human-friendly way.

FIT-Mobility/interaction-protocol-suite 1

Interaction Protocol Specification and Validation Suite

NeoLegends/babel-plugin-transform-react-create-element 1

Shorten JSX `React.createElement` calls using a local variable

NeoLegends/DocNet 1

A tool that generates WordPress (or any other kind of CMS) pages using .NET XML-Documentation.

NeoLegends/gabelung 1

Branch an asynchronous stream of cloneable items into two.

BILDQUADRAT/gatsby-source-storyblok 0

Gatsby source plugin for building websites using the Storyblok headless CMS as a data source.

push eventNeoLegends/tower-http

Moritz Gunz

commit sha 1af2eef655cefb7158231020afefab0fdb528a64

fix: Make CompressionLayer::default() use ::new()

view details

push time in 4 days

push eventNeoLegends/tower-http

ttys3

commit sha 69040085c404a47d2828ae40d88af4ae906b715a

Improve performance of `ServeDir` and `ServeFile`

view details

Matt

commit sha 8e299ebe035b51c551735091ae2dc5ebde6b1c2d

Pass configuration from {de}compression layer into middleware (#132)

view details

Moritz Gunz

commit sha d6cd4725686d571b85708df8294c8c8a68b0613b

Don't recompress HTTP responses (#140)

view details

Hanno Braun

commit sha 1ec7dcc9ba45ec75ae6c86e630982933976c75c6

Fix build warning (#144) The lint has been renamed.

view details

Muhammad Hamza

commit sha 773a7813226a26e1cbfd348e2970e598a7f6470d

Add `AsyncRequireAuthorization` (#118)

view details

Jonas Platte

commit sha 41bcf9d203406981b2c088382a29e306a0b08b7c

Improve set header docs (#143) * Explain PhantomData types with comments * Remove unused import in doctest * Split docs for set_header methods into paragraphs * Remove unnecessary trait bounds

view details

Moritz Gunz

commit sha c657ca9977ab6084a82492ae99b3eda7f139b2b8

Merge branch 'master' into feat/no-compression-below-certain-size

view details

push time in 4 days

push eventNeoLegends/dotfiles

Moritz Gunz

commit sha ae4c3b0c5030f295bf6b9e5014db9211b4208d3b

chore: Add support for credentials file

view details

push time in 9 days

push eventNeoLegends/dotfiles

Moritz Gunz

commit sha 662d5972f73bf25148184edd3b762f68b667d0a2

Initial commit

view details

push time in 11 days

push eventNeoLegends/dotfiles

Moritz Gunz

commit sha 08e2c4066d53080f434b2b56a5563405448daf95

Initial commit

view details

push time in 11 days

create barnchNeoLegends/dotfiles

branch : main

created branch time in 11 days

created repositoryNeoLegends/dotfiles

created time in 11 days

push eventNeoLegends/tower-http

Moritz Gunz

commit sha 0700427399b0469d676ecc80fdd54bd944f103f2

chore: Specify min_size as u16 to save space

view details

push time in 18 days

PR opened tower-rs/tower-http

feat: Allow specifying a minimum body size for compression

<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests.

Contributors guide: https://github.com/tower-rs/tower-http/blob/master/CONTRIBUTING.md -->

Motivation

Closes #139

<!-- Explain the context and why you're making that change. What is the problem you're trying to solve? If a new feature is being added, describe the intended use case that feature fulfills. -->

Solution

The layer now inspects the response body's size_hint (only if exact) and content-length header to measure the size of the content. If it's below a preconfigured threshold (default: 32 bytes) compression won't happen.

Now, the only remaining question I have is what the default should be. I think having a default > 0 is very helpful, because it stops the layer from wasting time compressing 0-sized and "very-small" responses. The only question is, what's "very-small"? nginx uses a default of 20 bytes, and I used 32 because it's a power of two and close to 20. Alternatives I see:

  • 0 bytes, keep the behavior identical to the current implementation. Users need to actively "do something" though to improve behavior on empty responses, whereas with a > 0 default they get that "for free".
  • 1 byte, just to save us from compressing 0-sized responses
  • 256 / 512 / 1024, a bit larger, low risk of wasting bandwith on http / text files

<!-- Summarize the solution and provide any necessary context needed to understand the code change. -->

+94 -12

0 comment

4 changed files

pr created time in 18 days

create barnchNeoLegends/tower-http

branch : feat/no-compression-below-certain-size

created branch time in 18 days

PR opened tower-rs/tower-http

fix: Don't recompress HTTP responses

Motivation

Closes #138

Solution

extended the supports_transparent_compression function to check for a content-encoding and added a test

+83 -18

0 comment

2 changed files

pr created time in 18 days

create barnchNeoLegends/tower-http

branch : fix/no-recompression

created branch time in 18 days

fork NeoLegends/tower-http

HTTP specific Tower utilities.

fork in 18 days

issue commenttower-rs/tower-http

Compression layer recompresses responses

Onto the PR then!

Thanks for the quick response!

NeoLegends

comment created time in 18 days

issue openedtower-rs/tower-http

Only compress responses above a certain size

Feature Request

Motivation

This is something I've seen in other web servers, where compression is only turned on for responses of e. g. >= 1kB. In particular, there's no use compressing an empty response.

Proposal

In the compression layer, check the body's size_hint(), and do not compress if there is an exact size hint less than a configured value.

I'd say if the size hint is not exact we default to compressing responses in any case.

Alternatives

Don't care and keep the current behavior.

created time in 18 days

issue openedtower-rs/tower-http

Compression layer recompresses responses

Bug Report

<!-- Thank you for reporting an issue.

Please fill in as much of the template below as you're able. -->

Version

<!-- List the versions of all tower-http crates you are using. The easiest way to get this information is using cargo tree:

cargo tree | grep tower-http -->

v0.1.1

Description

If a layer below the compression layer returns a response whose body is already compressed, the compression-layer will happily re-compress the already compressed bytes, because it does not check the Content-Encoding before applying its body transformation.

https://github.com/tower-rs/tower-http/blob/36157ce3ed7cbf30d2c8016ec8054b703308c585/tower-http/src/compression/future.rs#L34-L67

This behavior is fine, if the content that passes through the layer is known to never be compressed already. In a complex application where the data comes from multiple sources, this might not always be the case. Therefore, the layer should probably check whether there already is a Content-Encoding on the response, and not apply any further transformations in this case. This would allow using the compression layer as a kind of "catch-all", at the outer edge of the layer stack.

If you agree I'm happy to send a PR 👍. I'd probably integrate this check into supports_transparent_compression.

created time in 18 days

startedtower-rs/tower-http

started time in 21 days

issue commenttokio-rs/tokio

thread 'tokio-runtime-worker' panicked at 'assertion failed: now >= lock.elapsed'

Is this something where the std should be patched to also defend against non-monotonic clocks on Linux?

abdelmonem17

comment created time in 22 days

PullRequestReviewEvent

pull request commentDefinitelyTyped/DefinitelyTyped

Added loading params to PlayerState

Hey @mijorus!

Can you show me where the value / property comes from? I can't seem to find it on https://developer.spotify.com/documentation/web-playback-sdk/reference/#object-web-playback-state.

mijorus

comment created time in a month

issue openednadimkobeissi/appleprivacyletter

[SIGN] Moritz Gunz

Name

Moritz Gunz

Affiliation

No response

Website/Twitter/etc.

No response

  • [ ] I am signing as an organization.

created time in 2 months

push eventnetlify/netlify-plugin-edge-handlers

renovate[bot]

commit sha 72ed150febd975708d8f402ab8950d431d4416f7

chore(deps): update dependency @netlify/build to ^16.2.0 (#459) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Moritz Gunz

commit sha bfb6c6df4e0c76dcc15eb75912a35963d66034ed

Merge branch 'main' into feat/esbuild

view details

push time in 2 months

push eventnetlify/netlify-plugin-edge-handlers

renovate[bot]

commit sha 862c5bb9db48561ae753cd91eb66a6723ccbfa0b

chore(deps): update dependency @netlify/build to ^16.1.1 (#458) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Moritz Gunz

commit sha 859159204f9e975e9b94b1c47a29d93270d15478

Merge branch 'main' into feat/esbuild

view details

push time in 2 months

push eventnetlify/netlify-plugin-edge-handlers

renovate[bot]

commit sha aac4cb6646ad9b1fb29c0658fb4d48527442d216

chore(deps): update dependency @netlify/build to ^16.1.0 (#457) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Moritz Gunz

commit sha 1c2a7e72d9f531ccabecbebf2dc1bb654e15b368

Merge branch 'main' into feat/esbuild

view details

push time in 2 months

push eventnetlify/netlify-plugin-edge-handlers

Moritz Gunz

commit sha bd255f028e96e1ba0bc213b51b266ebf5869205e

chore: remove all traces of rollup

view details

push time in 2 months

create barnchnetlify/netlify-plugin-edge-handlers

branch : feat/esbuild

created branch time in 2 months

issue openednetlify/netlify-plugin-edge-handlers

Consider using esbuild instead of rollup

To speed up compile times.

created time in 2 months

PullRequestReviewEvent

startedivmarkov/rust-esp32-std-hello

started time in 3 months