Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in StreamTransformer - ending fragment not getting sent #2317

Merged
merged 2 commits into from
Apr 26, 2021

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Apr 26, 2021

No description provided.

@slaff slaff added this to the 4.3.1 milestone Apr 26, 2021
@slaff
Copy link
Contributor

slaff commented Apr 26, 2021

@mikee47 Please, add tests to this PR.

Before:

```
> ChunkedStream / StreamTransformer
758 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a                                         a..
792 FAIL: FS_OUTPUT == s
FAIL in `virtual void StreamTest::execute()`
```

After:

```
>> ChunkedStream / StreamTransformer
741 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a 30 0d 0a 0d 0a                          a..0....
760 OK: FS_OUTPUT == s
```
@mikee47
Copy link
Contributor Author

mikee47 commented Apr 26, 2021

Before:

> ChunkedStream / StreamTransformer
758 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a                                         a..
792 FAIL: FS_OUTPUT == s
FAIL in `virtual void StreamTest::execute()`

After:

>> ChunkedStream / StreamTransformer
741 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a 30 0d 0a 0d 0a                          a..0....
760 OK: FS_OUTPUT == s

@slaff slaff merged commit 639c06b into SmingHub:develop Apr 26, 2021
@mikee47 mikee47 deleted the fix/streamtransformer-end branch April 26, 2021 19:42
slaff pushed a commit to slaff/Sming that referenced this pull request Apr 27, 2021
…gHub#2317)

* Fix bug in StreamTransformer - ending fragment not getting sent

* Add test to verify fix

Before:

```
> ChunkedStream / StreamTransformer
758 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a                                         a..
792 FAIL: FS_OUTPUT == s
FAIL in `virtual void StreamTest::execute()`
```

After:

```
>> ChunkedStream / StreamTransformer
741 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a 30 0d 0a 0d 0a                          a..0....
760 OK: FS_OUTPUT == s
```
slaff added a commit that referenced this pull request May 4, 2021
…getting sent (#2317) (#2320)

* Fix bug in StreamTransformer - ending fragment not getting sent (#2317)

* Fix bug in StreamTransformer - ending fragment not getting sent

* Add test to verify fix

Before:

```
> ChunkedStream / StreamTransformer
758 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a                                         a..
792 FAIL: FS_OUTPUT == s
FAIL in `virtual void StreamTest::execute()`
```

After:

```
>> ChunkedStream / StreamTransformer
741 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a 30 0d 0a 0d 0a                          a..0....
760 OK: FS_OUTPUT == s
```

* Fix use-unitialized issue reported by the GCC Host compiler.

* Revert "Fix use-unitialized issue reported by the GCC Host compiler."

This reverts commit 84fc04c.

* Try to supress false-positive error message from GCC 9.2.0 from MinGW.

* Trying to fix also Travis builds.

Co-authored-by: Mike <[email protected]>
Co-authored-by: Slavey Karadzhov <[email protected]>
@slaff slaff mentioned this pull request May 5, 2021
5 tasks
slaff pushed a commit that referenced this pull request Sep 27, 2021
* Fix bug in StreamTransformer - ending fragment not getting sent

* Add test to verify fix

Before:

```
> ChunkedStream / StreamTransformer
758 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a                                         a..
792 FAIL: FS_OUTPUT == s
FAIL in `virtual void StreamTest::execute()`
```

After:

```
>> ChunkedStream / StreamTransformer
741 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a 30 0d 0a 0d 0a                          a..0....
760 OK: FS_OUTPUT == s
```
slaff added a commit that referenced this pull request Dec 24, 2021
* Fix base64 encode length calculation to account for padding (#2307)

* Fix base64 encode length calculation

Must take padding into account

* Make `base64_min_encode_len` and `base64_min_decode_len` functions available publicly.

* Add tests to verify that expected output buffer sizes are not exceeded

* [Backport to LTS] Fix bug in StreamTransformer - ending fragment not getting sent (#2317) (#2320)

* Fix bug in StreamTransformer - ending fragment not getting sent (#2317)

* Fix bug in StreamTransformer - ending fragment not getting sent

* Add test to verify fix

Before:

```
> ChunkedStream / StreamTransformer
758 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a                                         a..
792 FAIL: FS_OUTPUT == s
FAIL in `virtual void StreamTest::execute()`
```

After:

```
>> ChunkedStream / StreamTransformer
741 OK: output.moveString(s)
OUTPUT: 65 0d 0a 53 6f 6d 65 20 74 65 73 74 20 64 61 74  e..Some test dat
        61 0d 0a 30 0d 0a 0d 0a                          a..0....
760 OK: FS_OUTPUT == s
```

* Fix use-unitialized issue reported by the GCC Host compiler.

* Revert "Fix use-unitialized issue reported by the GCC Host compiler."

This reverts commit 84fc04c.

* Try to suppress false-positive error message from GCC 9.2.0 from MinGW.

* Trying to fix also Travis builds.

Co-authored-by: Mike <[email protected]>
Co-authored-by: Slavey Karadzhov <[email protected]>

* Store the actual size of the downloaded rBoot item. (#2327)

* Fix for SPI debug. (#2382)

* Bugfix: WDT::alive() calls wrong function (#2383)

* Bugfix: String::replace not using memmove (#2384)

Can fail when regions overlap

* Bugfix: Edge case in  String::replace (#2401)

* Fixed a bug with request headers not being reset. (#2424) (#2426)

Co-authored-by: Mike <[email protected]>
Co-authored-by: Slavey Karadzhov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants