Commit Graph

41 Commits

Author SHA1 Message Date
Juan Batiz-Benet
51a8bcbf64 Merge pull request #847 from jbenet/publish-webui
published new webui
2015-03-02 23:38:30 -08:00
Juan Batiz-Benet
7bc1de4ec5 published new webui
/ipfs/QmXX7YRpU7nNBKfw75VG7Y1c3GwpSAGHRev67XVPgZFv9R

ee74f75d0b
2015-03-02 23:33:10 -08:00
bbenshoof
ac5cfc5664 fixing bug 812 2015-03-02 17:07:21 -05:00
Henry
92d08db7a5 rewrote import paths of go.net/context to use golang.org/x/context
- updated go-ctxgroup and goprocess
ctxgroup: AddChildGroup was changed to AddChild. Used in two files:
- p2p/net/mock/mock_net.go
- routing/dht/dht.go

- updated context from hg repo to git
prev. commit in hg was ad01a6fcc8a19d3a4478c836895ffe883bd2ceab. (context: make parentCancelCtx iterative)
represents commit 84f8955a887232b6308d79c68b8db44f64df455c in git repo

- updated context to master (b6fdb7d8a4ccefede406f8fe0f017fb58265054c)

Aaron Jacobs (2):
net/context: Don't accept a context in the DoSomethingSlow example.
context: Be clear that users must cancel the result of WithCancel.

Andrew Gerrand (1):
go.net: use golang.org/x/... import paths

Bryan C. Mills (1):
net/context: Don't leak goroutines in Done example.

Damien Neil (1):
context: fix removal of cancelled timer contexts from parent

David Symonds (2):
context: Fix WithValue example code.
net: add import comments.

Sameer Ajmani (1):
context: fix TestAllocs to account for ints in interfaces
2015-02-25 11:58:19 +01:00
Jeromy
69e09d40c5 add version info endpoint to gateway 2015-02-20 11:49:48 -08:00
Juan Batiz-Benet
34e4d8c3a6 updated webui 2015-02-16 13:53:21 -08:00
Juan Batiz-Benet
01feeac1bb new webui hash 2015-02-16 04:34:36 -08:00
Kevin Wallace
e5abf0764c corehttp: add test for gateway with mocked namesys
License: MIT
Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
2015-02-08 12:54:43 -08:00
Kevin Wallace
794b7b7b3e corehttp: tear off makeHandler, for tests
License: MIT
Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
2015-02-08 12:50:47 -08:00
Kevin Wallace
084cdc3ed8 gateway: attempt to resolve hostname to ipfs path
This allows someone to host a static site by pointing a TXT record at their
content in IPFS, and a CNAME record at an IPFS gateway.

Note that such a setup technically violates RFC1912 (section 2.4; "A CNAME
record is not allowed to coexist with any other data."), but tends to work in
practice.

We may want to consider changing the DNS->IPFS resolution scheme to allow this
scenario to be RFC-compliant (e.g. store the mapping on a well-known subdomain
to allow CNAME records on the domain itself).

License: MIT
Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
2015-02-08 11:27:06 -08:00
Kevin Wallace
fbd76ebb5b corehttp: ServeOption supports chaining muxes
Each option now additionally returns the mux to be used by future options. If
every options returns the mux it was passed, the current behavior is unchanged.

However, if the option returns an a new mux, it can mediate requests to handlers
provided by future options:

    return func(n *core.IpfsNode, mux *http.ServeMux) (*http.ServeMux, error) {
      childMux := http.NewServeMux()
      mux.Handle("/", handlerThatDelegatesToChildMux)
      return childMux, nil
    }

License: MIT
Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
2015-02-08 11:27:06 -08:00
Juan Batiz-Benet
872c64dd79 gateway: dont cache ipns paths
ipns paths are mutable and should not be cached. this error is
a byproduct of the currently messy gateway route. We should split
the /ipfs and /ipns routes up.
2015-02-07 10:10:05 -08:00
Brian Tiger Chow
db644fe1b7 allow access to the field for convenience
decalarative configuration is superior. the thread-safety because
important during normal operation
2015-02-06 08:13:15 -08:00
Juan Batiz-Benet
64a4c27913 corehttp: allow all webui paths we published.
Otherwise we break users links! cc @mappum
2015-02-06 07:30:42 -08:00
Matt Bell
0195c03664 core/corehttp: Updated WebUI hash 2015-02-04 23:51:06 -08:00
Matt Bell
2d173c3a25 core/corehttp: Return 403 for blocked requests instead of 404 2015-02-04 18:46:59 -08:00
Matt Bell
b1ca07d6c5 core/corehttp: Added gateway path whitelisting 2015-02-04 18:46:54 -08:00
Matt Bell
262e78122a core/corehttp: Added Suborigin header to gateway responses 2015-02-04 16:53:24 -08:00
Brian Tiger Chow
d50a7ff003 feat(corehttp) add a Gateway blocklist
use pointer

use func

comment on decider to clarify whether it allows or denies

fix set conf

gstw
2015-02-04 16:17:39 -08:00
Juan Batiz-Benet
58f39687cf logs: removed all log.Errors unhelpful to users
Let's save log.Error for things the user can take action on.
Moved all our diagnostics to log.Debug. We can ideally reduce them
even further.
2015-02-03 01:06:07 -08:00
Juan Batiz-Benet
f1d34a2a85 test/sharness: fix errors
- core: daemon stdout print to cmd + daemon init checks
- core: fixed bug where the gateway was printed as "API"
- sharness/test-lib: daemon init checks
- sharness/test-lib: portable TCP port check
- sharness/init: fix test bits output
- sharness: use common hashes in one place.
- move t0100-http-gateway -> t0111-gateway-writable
- sharness: test-lib funcs for gateway config
- sharness/t0111-gateway-writable: use sh funcs
- sharness/t0111-gateway-writable: fixes
  - escape all vars (always `cmd "$VAR"` never `cmd $VAR`)
  - use $FILEPATH, not $path
  - last test seems to fail
2015-01-31 22:54:34 -08:00
Mildred Ki'Lya
295cc443da HTTP Gateway: add /ipns/ GET requests 2015-01-31 23:36:46 +01:00
Mildred Ki'Lya
7d09da3c8b Make gateway read-only by default and add option to make it writable 2015-01-31 23:36:45 +01:00
Mildred Ki'Lya
d221d55d85 HTTP: add handlers to allow object creation and modification 2015-01-31 20:47:34 +01:00
Jeromy
abb3c9c9c4 implement path type 2015-01-29 17:51:08 +00:00
Juan Batiz-Benet
c36e8dd04c gateway: reordered headers to avoid error
cc @mappum
2015-01-28 16:55:00 -08:00
Matt Bell
cea68afa2e core/corehttp: Handle Etag for caching 2015-01-28 16:50:16 -08:00
Matt Bell
fb986fd822 core/corehttp: Added cache headers to gatewayy requests 2015-01-28 16:48:07 -08:00
Matt Bell
e4eb964f69 core/corehttp: Use consts for path prefixes 2015-01-28 16:43:45 -08:00
Matt Bell
2759d1c126 core/corehttp: Added handling of /ipns/<hash>/x paths 2015-01-28 16:38:36 -08:00
Matt Bell
950e492fc4 core/corehttp: Close DAGReaders when done 2015-01-28 16:01:42 -08:00
Matt Bell
58d401c3b0 core/corehttp: gateway_handler: Redirect to path with trailing slash when showing a directory's index.html 2015-01-28 16:01:42 -08:00
Matt Bell
e2be5c2039 core/corehttp: Added RedirectOption 2015-01-28 16:01:41 -08:00
Matt Bell
b8fcece0e5 core/corehttp: Handle IPNS paths in gateway 2015-01-28 16:01:41 -08:00
Matt Bell
d338a81eca core/corehttp: Support Range requests in gateway handler 2015-01-28 15:49:55 -08:00
Jeromy
26826bd55e implement seeking in the dagreader 2015-01-27 01:33:09 +00:00
Brian Tiger Chow
e9d3c9828c perform multiaddr conversion in the function 2015-01-24 01:32:27 -08:00
Brian Tiger Chow
6fedf259eb remove prefix logger 2015-01-24 00:30:56 -08:00
Matt Bell
81d17e0843 cmd/ipfs: gatewayHandler: Fixed directory listing getting appended to index.html pages 2015-01-22 16:29:00 -08:00
Brian Tiger Chow
fadede6cb2 separate concerns 2015-01-22 01:28:40 -08:00
Brian Tiger Chow
fadedf9e68 refactor(core) extract corehttp package
PACKAGE DOCUMENTATION

package corehttp

    FUNCTIONS

    func GatewayOption(n *core.IpfsNode, mux *http.ServeMux) error

    func ListenAndServe(n *core.IpfsNode, addr ma.Multiaddr, options
    ...ServeOption) error

    func WebUIOption(n *core.IpfsNode, mux *http.ServeMux) error

    TYPES

    type ServeOption func(*core.IpfsNode, *http.ServeMux) error

    func DaemonOption(cctx commands.Context) ServeOption
2015-01-22 01:08:59 -08:00