dch

Members
  • Content Count

    4
  • Joined

  • Last visited

About dch

  • Rank
    New User
  1. Request Headers. Note Accept. GET /api?method=get_folders HTTP/1.1Accept: application/jsonAccept-Encoding: gzip, deflate, compressAuthorization: Basic ASDFgfdsghstFDASGFDAGRADContent-Type: application/json; charset=utf-8Host: wintermute:8888User-Agent: HTTPie/0.8.0Response Headers. Note Content-Type. HTTP/1.1 200 OKCache-Control: no-cacheConnection: keep-aliveContent-Length: 654Content-Type: text/javascriptContent-Type should obviously be application/json -- we are not returning arbitrary JavaScript (aka JSONP) here. This should be fixed because: 1. sent content-type should match the requested type within reason 2. it's clearly application/json data being returned anyway 3. downstream APIs and tools may not handle text/javascript in the same way This specific example taken from FreeBSD 10.0 client. I'd suggest also you may want to consider including the btsync version in the returned headers. This will be useful in future for feature detection and operations.
  2. The solution is to consider something like the draft IETF standard, and develop towards that http://datatracker.ietf.org/doc/draft-ietf-ppsp-peer-protocol/ instead using a public, open, protocol, at the core. Contact me offline if interested in discussing this further, its not really appropriate for the sync forum. twitter:@dch__
  3. For example: [1] + 33469 bus error /Applications/BTSync.app/Contents/MacOS/btsync --config If the directory specified for the pidfile is missing, or the storage_path isn't accessible, or AFAICT the pseudo-JSON you are using isn't valid. I'd strongly advise dropping the `// comments` from the format, and enabling us to use normal JSON parsers and validators to manage this.
  4. Either set up a launchd plist, for example here's one for Apache CouchDB: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>Label</key> <string>org.apache.couchdb</string> <key>EnvironmentVariables</key> <dict> <key>HOME</key> <string>/usr/local/var/lib/couchdb/</string> </dict> <key>ProgramArguments</key> <array> <string>/usr/local/bin/couchdb</string> </array> <key>UserName</key> <string>couchdb</string> <key>StandardOutPath</key> <string>/dev/null</string> <key>StandardErrorPath</key> <string>/dev/null</string> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> </dict></plist>modify this file as needed, put it in `/Library/LaunchDaemons/com.bittorrent.btsync.plist` and then use `/usr/bin/sudo launchctl load -w /Library/LaunchDaemons/com.bittorrent.btsync.plist` to start it and `/usr/bin/sudo launchctl unload /Library/LaunchDaemons/com.bittorrent.btsync.plist` to stop it Alternatively, run it when you need it from the terminal: /Applications/BitTorrent\ Sync.app/Contents/MacOS/BitTorrent\ Sync-config ~/btconfig/config.json &the & forces it to run in the background.