Skip to content

Commit

Permalink
Merge pull request #189 from zhangyangjing/patch-2
Browse files Browse the repository at this point in the history
Fix 'nil pointer dereference'
  • Loading branch information
baywet authored Dec 13, 2024
2 parents 5beb0cf + ac57f85 commit d695eb6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
branches: [ main ]
schedule:
- cron: '40 16 * * 3'
workflow_dispatch:

jobs:
analyze:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.4.6] - 2024-12-13

### Changed

- Fixed a bug where headers inspection handler would fail upon receiving an error.

## [1.4.5] - 2024-09-03

### Changed

- Fixed a bug in compression middleware which caused empty body to send on retries

## [1.4.4] - 2024-08-13
Expand Down
6 changes: 3 additions & 3 deletions headers_inspection_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ func (middleware HeadersInspectionHandler) Intercept(pipeline Pipeline, middlewa
}
}
response, err := pipeline.Next(req, middlewareIndex)
if err != nil {
return response, err
}
if reqOption.GetInspectResponseHeaders() {
for k, v := range response.Header {
if len(v) == 1 {
Expand All @@ -113,8 +116,5 @@ func (middleware HeadersInspectionHandler) Intercept(pipeline Pipeline, middlewa
}
}
}
if err != nil {
return response, err
}
return response, err
}
2 changes: 1 addition & 1 deletion user_agent_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func NewUserAgentHandlerOptions() *UserAgentHandlerOptions {
return &UserAgentHandlerOptions{
Enabled: true,
ProductName: "kiota-go",
ProductVersion: "1.4.5",
ProductVersion: "1.4.6",
}
}

Expand Down

0 comments on commit d695eb6

Please sign in to comment.