Commit 82eab41a authored by owlo's avatar owlo

server borkings

parent 44361878
No preview for this file type
......@@ -468,8 +468,8 @@ func main() {
w.Header().Set("Authorization", "ok")
w.WriteHeader(http.StatusOK)
space := ""
for x := 0; x < 240; x++ {
if x != 127 {
for x := 0; x < 296; x++ {
if x != 142 {
space += "X"
} else {
space += "@"
......@@ -538,6 +538,60 @@ func main() {
}
})
// mux.HandleFunc("/.well-known/webfinger?resource=acct:guarddoggo@example.com", func(w http.ResponseWriter, req *http.Request) {
// Before any call to WriteHeader or Write, declare
// the trailers you will set during the HTTP
// response. These three headers are actually sent in
// the trailer.
// fmt.Println("SOMEONE IS PREPARING TO BORK.")
//defer resp.Body.Close()
//THIS NEEDS TO BE AVAILABLE AS A RESPONSE TO THAT^^
//{
// "subject": "acct:alice@my-example.com",
//
// "links": [
// {
// "rel": "self",
// "type": "application/activity+json",
// "href": "https://my-example.com/actor"
// }
// ]
//}
// object, err := ioutil.ReadAll(req.Body)
// req.Body.Close()
// if err != nil {
// fmt.Println("Error reading reponse.")
// fmt.Println(err)
// }
// beachBall := object
// fmt.Println(beachBall)
// UID := UIDMaker("post")
// validate(UID, object)
//ALSO THE KEY HAS TO BE AVAILBLE TO WEBFINGER LIKE SO
// {
// "@context": "https://www.w3.org/ns/activitystreams",
//
// "id": "https://my-example.com/create-hello-world",
// "type": "Create",
// "actor": "https://my-example.com/actor",
//
// "object": {
// "id": "https://my-example.com/hello-world",
// "type": "Note",
// "published": "2018-06-23T17:17:11Z",
// "attributedTo": "https://my-example.com/actor",
// "inReplyTo": "https://mastodon.social/@Gargron/100254678717223630",
// "content": "<p>Hello world</p>",
// "to": "https://www.w3.org/ns/activitystreams#Public"
// }
// }
// })
// http.ListenAndServe(":8080", mux)
// }
mux.HandleFunc("/exampleposter", func(w http.ResponseWriter, req *http.Request) {
// Before any call to WriteHeader or Write, declare
// the trailers you will set during the HTTP
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment