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 'nil pointer dereference' #189

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading