Skip to content

Commit a8912e4

Browse files
wkl3nksschuberth
authored andcommitted
fix(fossid): Increase HTTP timeout for deletion of uploaded content
If configured, the FossID plugin will delete uploaded content after scan completion. Under some circumstances, FossID will not send a response to the respective HTTP request within 10 seconds, which results in a timeout in the FossID plugin. Increase this timeout similar to other remote calls to FossID to reduce the risk to run into this timeout. Signed-off-by: klw1imb <[email protected]>
1 parent c55bfe7 commit a8912e4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

clients/fossid-webapp/src/main/kotlin/FossIdRestService.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ interface FossIdRestService {
206206
suspend fun extractArchives(@Body body: PostRequestBody): EntityResponseBody<Boolean>
207207

208208
@POST("api.php")
209+
@Headers("$READ_TIMEOUT_HEADER:${60 * 1000}")
209210
suspend fun removeUploadedContent(
210211
@Body body: PostRequestBody
211212
): PolymorphicDataResponseBody<RemoveUploadContentResponse>

plugins/scanners/fossid/src/main/kotlin/events/UploadArchiveHandler.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class UploadArchiveHandler(
130130

131131
override suspend fun afterCheckScan(scanCode: String) {
132132
if (config.deleteUploadedArchiveAfterScan) {
133+
logger.info { "Deleting uploaded archive for scan '$scanCode'." }
133134
service.removeUploadedContent(config.user.value, config.apiKey.value, scanCode)
134135
.checkResponse("remove previously uploaded content 2", false)
135136
}

0 commit comments

Comments
 (0)