Skip to content

Repository mismatch: URLSessionTask.c is in jdolan/Objectively, not ObjectivelyMVC#35

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-deprecated-curlopt-put
Closed

Repository mismatch: URLSessionTask.c is in jdolan/Objectively, not ObjectivelyMVC#35
Copilot wants to merge 1 commit intomainfrom
copilot/fix-deprecated-curlopt-put

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 7, 2026

The deprecated CURLOPT_PUT usage at line 253 of URLSessionTask.c is in the jdolan/Objectively repository, not this repository (jdolan/ObjectivelyMVC).

Issue

ObjectivelyMVC is a UI framework that depends on Objectively (a separate library) via pkg-config. The file Sources/Objectively/URLSessionTask.c containing the deprecated curl option does not exist in this repository.

Required Action

Clone jdolan/Objectively and apply the fix there:

  • File: Sources/Objectively/URLSessionTask.c
  • Line 253: Change curl_easy_setopt(self->locals.handle, CURLOPT_PUT, true) to curl_easy_setopt(self->locals.handle, CURLOPT_UPLOAD, 1L)

Verification

GitHub code search confirms CURLOPT_PUT exists only in jdolan/Objectively:

# Returns 2 results in Objectively repo
repo:jdolan/Objectively CURLOPT_PUT

# Returns 0 results in ObjectivelyMVC repo  
repo:jdolan/ObjectivelyMVC CURLOPT_PUT
Original prompt

Problem

The code is using the deprecated CURLOPT_PUT option which has been deprecated since curl 7.12.1. This causes the following compiler warning:

URLSessionTask.c: In function 'setup':
URLSessionTask.c:253:7: warning: 'CURLOPT_PUT' is deprecated: since 7.12.1. Use CURLOPT_UPLOAD [-Wdeprecated-declarations]
  253 |       curl_easy_setopt(self->locals.handle, CURLOPT_PUT, true);
      |       ^~~~~~~~~~~~~~~~
In file included from URLSessionTask.c:27:
/usr/include/x86_64-linux-gnu/curl/curl.h:1281:3: note: declared here
 1281 |   CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
      |   ^~~~~~~~~~~~~~~~~

Solution

Replace the deprecated CURLOPT_PUT option with CURLOPT_UPLOAD as recommended by the curl documentation.

In URLSessionTask.c at line 253, change:

curl_easy_setopt(self->locals.handle, CURLOPT_PUT, true);

to:

curl_easy_setopt(self->locals.handle, CURLOPT_UPLOAD, 1L);

Note: According to curl documentation, CURLOPT_UPLOAD should be set to 1L (long integer) to enable upload mode, which is equivalent to the previous CURLOPT_PUT behavior.

Testing

Verify that:

  1. The warning no longer appears during compilation
  2. PUT requests continue to work correctly
  3. No functional changes to the upload behavior

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix deprecated CURLOPT_PUT usage in URLSessionTask Repository mismatch: URLSessionTask.c is in jdolan/Objectively, not ObjectivelyMVC Feb 7, 2026
Copilot AI requested a review from jdolan February 7, 2026 19:29
@jdolan jdolan closed this Feb 7, 2026
@jdolan jdolan deleted the copilot/fix-deprecated-curlopt-put branch February 7, 2026 19:37
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.

2 participants