Skip to content

Adapt different stream data prefix, with or without space #945

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

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

panzhongxian
Copy link
Contributor

This is an alternative to another PR #932

Instead of compare header string, this PR use regex pattern to match and replace the header. It seems a more clear way to implement it.

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.88%. Comparing base (774fc9d) to head (11cdb5a).
Report is 93 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #945      +/-   ##
==========================================
+ Coverage   98.46%   98.88%   +0.41%     
==========================================
  Files          24       27       +3     
  Lines        1364     1786     +422     
==========================================
+ Hits         1343     1766     +423     
+ Misses         15       14       -1     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@panzhongxian
Copy link
Contributor Author

@sashabaranov Sorry to disturb you. I can't reopen the old one PR #941 after rebasing and force pushing. So I create a new one.

@sashabaranov sashabaranov requested a review from Copilot April 29, 2025 13:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the stream header processing by switching from static byte comparisons to regex matching and replacement to better accommodate prefixes that may or may not have spaces.

  • Replaced byte slice header strings with corresponding regex patterns.
  • Updated the processLines method to use regex Match and ReplaceAll for header detection and removal.

Copy link
Owner

@sashabaranov sashabaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Merging this one instead of #932 due to more comprehensible diff

@sashabaranov sashabaranov merged commit 4cccc6c into sashabaranov:master Apr 29, 2025
3 checks passed
@sashabaranov sashabaranov mentioned this pull request Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants