-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Swift Package Manager Publishing using commandline throws error #33990
Comments
What's your version of swift cli? |
aka XCode 16.2
|
btw sorry for confusion guess i catched the wrong output:
it throughs 400 not 409 |
somehow the multipart upload not detected correctly need to debug bit deeper with a proxy bit deeper to get correct curl call to reproduce ... |
guess problem can be found in the way the multi-parts are sent ... let me verify the proposed solution workes. |
|
Is it standard? If yes, it should. |
|
package main
import (
"net/http"
"os"
"github.com/hiifong/log"
)
func main() {
// /{scope}/{name}/{version}
http.HandleFunc("/pkg/test/0.1.0", func(w http.ResponseWriter, r *http.Request) {
log.Infof("Method: %s, URL: %s", r.Method, r.URL)
log.Infof("Header: %v", r.Header)
log.Infof("Body: %v", r.Body)
w.Write([]byte("Hello, World!"))
// ====================
err := r.ParseMultipartForm(32 << 20)
if err != nil {
log.Errorf("ParseMultipartForm error: %v", err)
}
str := r.MultipartForm.Value["source-archive"][0]
//log.Infof("strs: %v", []byte(str))
//dec, err := base64.StdEncoding.DecodeString(str)
//if err != nil {
// log.Errorf("base64 decode error: %v", err)
//}
f, err := os.Create("test.zip")
if err != nil {
log.Errorf("create file error: %v", err)
}
defer f.Close()
if _, err = f.Write([]byte(str)); err != nil {
log.Errorf("write file error: %v", err)
}
if err := f.Sync(); err != nil {
log.Errorf("sync file error: %v", err)
}
w.Write([]byte("Created!"))
})
log.Fatalf("server error: %v", http.ListenAndServe(":8282", nil))
} |
|
Description
There seem some error using apples swift publish command on swift package manager registry
using curl works without problem
Gitea Version
1.23.5
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/wgr1984/edb15ebabadad1c4f18cf4c0b0d2eb31
Screenshots
No response
Git Version
No response
Operating System
Docker: gitea/gitea:latest
How are you running Gitea?
Docker compose setup
Database
MSSQL
The text was updated successfully, but these errors were encountered: