syedmurtaza108 / chucker-flutter

An HTTP requests inspector inspired by Chucker Android
https://pub.dev/packages/chucker_flutter
MIT License
51 stars 29 forks source link

fix headers erasing from response #60

Closed Serproger closed 7 months ago

Serproger commented 8 months ago

Description

Currently ChuckerHttpClient preserves only a status code and a body of the response stripping away other parts of StreamedResponse (for example headers). In particular it can cause incorrect decoding of the response (for example, when the response contains symbols of national alphabets). The given PR addresses this issue.

Type of Change

syedmurtaza108 commented 8 months ago

Hello @Serproger, thank you for fixing the issue. I can't merge your PR because it is failing one of the unit tests, please see https://github.com/syedmurtaza108/chucker-flutter/actions/runs/6891022076/job/18746529253?pr=60.

Serproger commented 8 months ago

Hello @Serproger, thank you for fixing the issue. I can't merge your PR because it is failing one of the unit tests, please see https://github.com/syedmurtaza108/chucker-flutter/actions/runs/6891022076/job/18746529253?pr=60.

As I can see, the failed test has nothing to do with my PR. This test checks the behavior of the interface and tries to tap a control that is located outside interface bounds. Therefore tap doesn't work and value of the preference doesn't change. I can't reproduce it locally, and all the tests are passed successfully, but according to Google, before tapping a widget you should ensure that this widget is visible with something like await tester.ensureVisible(find.byWidget(switches.elementAt(1).widget));. So I would suggest you fixing the wrong test :)

Serproger commented 7 months ago

@syedmurtaza108 could you please publish this change as a new release?