1
0
Fork 0
Commit graph

117 commits

Author SHA1 Message Date
Andy Wingo
1636c96f9f remove obsolete (tekuti url)
* tekuti/url.scm: Remove.
* Makefile.am: Remove url.scm

* tekuti/post.scm: Remove reference to (tekuti url).
  (parse-post-data): Use uri-encode.
2011-02-22 22:19:30 +01:00
Aleix Conchillo Flaque
800e7d9a05 do not remove numbers and s/./-/ in post keys 2011-02-18 23:36:10 +01:00
Andy Wingo
fce14fbddf s/unparse-uri/uri->string/ 2011-02-18 23:34:57 +01:00
Aleix Conchillo Flaque
2a87435f81 fixes due to (web http) updates 2011-02-18 23:34:27 +01:00
Andy Wingo
a357b2a0dc support for deleting post comments 2011-02-18 23:34:17 +01:00
Andy Wingo
9ec70ebff5 add support for deleting posts 2011-02-18 23:31:42 +01:00
Aleix Conchillo Flaque
66e04753f6 wordpress-xmlrpc: added usage help 2011-02-18 23:28:46 +01:00
Aleix Conchillo Flaque
cffa7dea90 wordpress-xmlrpc: more youtube/googlevideo updates 2011-02-18 23:27:50 +01:00
Aleix Conchillo Flaque
612577eca9 inform the user of malformed xhtml internal error when publishing 2011-02-18 23:27:45 +01:00
Aleix Conchillo Flaque
0dee43b2a0 wordpress-xmlrpc: use video.google.com instead of .es 2011-02-18 23:26:18 +01:00
Aleix Conchillo Flaque
199ad57615 wordpress-xmlrpc: fix googlevideo and youtube urls 2011-02-18 23:26:13 +01:00
Aleix Conchillo Flaque
606ecad873 wordpress-xmlrpc: fix media html tags (again) 2011-02-18 23:26:09 +01:00
Aleix Conchillo Flaque
2da5248073 wordpress-xmlrpc: fix media html tags 2011-02-18 23:26:05 +01:00
Aleix Conchillo Flaque
280696ea06 wordpress-xmlrpc: added support for wp media tags youtube/googlevideo 2011-02-18 23:25:59 +01:00
Aleix Conchillo Flaque
736a074097 wordpress-xmlrpc: download unlimited comments 2011-02-18 23:25:43 +01:00
Aleix Conchillo Flaque
fc07af26f6 wordpress-xmlrpc: use str type for pycurl urls 2011-02-18 23:23:06 +01:00
Aleix Conchillo Flaque
93789f0d07 add head link tag for atom feed 2011-02-18 23:22:46 +01:00
Aleix Conchillo Flaque
bf90b687e0 added wordpress (xmlprc) to tekuti script 2011-02-18 23:22:11 +01:00
Andy Wingo
f350e252fc mod-lisp updates
* tekuti/mod-lisp.scm: update tekuti/mod-lisp to parse headers to
  symbols, and to deal in bytevectors only.
2011-02-18 23:20:26 +01:00
Andy Wingo
bed9fff79d request-form-data smarter about character encodings
* tekuti/request.scm (request-form-data): Allow the body to be a
  bytevector. Update to new uri interface, and allow alternate
  encodings.
2010-12-11 19:18:13 +01:00
Andy Wingo
98cac18528 mod-lisp calls setvbuf only once
* tekuti/mod-lisp.scm (mod-lisp-read): Like the http impl, just setvbuf
  once, and don't throw away data (!).
2010-12-06 20:01:43 +01:00
Andy Wingo
68966d9e17 fix time comparisons
* tekuti/cache.scm (make-entry): Fix time comparisons.
2010-12-06 13:06:50 +01:00
Andy Wingo
8f2e3b741c more etag
* tekuti/page.scm (page-feed-atom): Also set etag on 304 responses
  here.
2010-12-06 13:04:24 +01:00
Andy Wingo
839d2e27eb cache returns 304 as appropriate; more pages set etags
* tekuti/cache.scm (update-cache): Expand cache size back to 20.
  (cached-response-and-body, make-entry): Entries are now procedures
  that return the cached pair. They also have some more smarts regarding
  etags, last-modified, and conditional requests.

* tekuti/page-helpers.scm (respond): Add etag arg. Set a date.

* tekuti/page.scm: Set etags on a number of pages.
2010-12-06 13:00:53 +01:00
Andy Wingo
15f024a12d robustness in mod-lisp-read
* tekuti/mod-lisp.scm (mod-lisp-read): Close the port if there is an
  error reading the request.
2010-12-06 11:37:47 +01:00
Andy Wingo
fc386dcb71 fix caching
* tekuti/cache.scm: Update with more structure. Use take-max, not
  list-head. Only cache cacheable request-response pairs.

* tekuti/index.scm: Add cache as index entry. Also return the index ref
  within the index itself, instead of at the head.

* tekuti/web.scm: Don't pass cache around, it's part of the index
  now. Adapt to new API.
2010-12-05 20:23:01 +01:00
Andy Wingo
aa86b62d79 simpler caching algorithm
* tekuti/cache.scm: Simpler LRU algorithm for the cache. Conses more,
  but throws away the cache less.
2010-12-04 20:08:16 +01:00
Andy Wingo
bc53abe0b6 mod-lisp sets client sockets to iso-8859-1
* tekuti/mod-lisp.scm (read-request/mod-lisp): Set port's encoding to
  latin-1, so that we reading one char reads one byte.
2010-12-04 13:15:47 +01:00
Andy Wingo
83a569885a use the simple cache
* tekuti/web.scm: Use the cache.
2010-12-03 19:59:45 +01:00
Andy Wingo
c099b9532c add a simple cache
* tekuti/cache.scm: Add a simple cache.
2010-12-03 19:59:32 +01:00
Andy Wingo
55617ccff2 tekuti git uses get-bytevector-all
* tekuti/git.scm (run): Use get-bytevector-all instead of
  read-delimited.
2010-12-03 19:59:15 +01:00
Andy Wingo
5900823c3e update mod-lisp web server impl
* tekuti/mod-lisp.scm: Update to use the poll set, do the right thing
  for SIGPIPE, etc, following http.scm. Maybe now it will actually be
  reliable.
2010-12-03 17:00:10 +01:00
Andy Wingo
a8ad41b06d src/tekuti is a shell script
* src/tekuti: Change to be a shell script.
2010-11-24 21:37:27 +01:00
Andy Wingo
507db16d48 fix locale setting
* src/tekuti: Use sh, not bash.

* tekuti/boot.scm (boot): Doh, actually set the locale.
2010-11-23 23:15:54 +01:00
Andy Wingo
16434bdf1d fix command-line parsing bugs
* src/tekuti: Fix bug processing command-line args.
2010-11-23 23:00:39 +01:00
Andy Wingo
6df26e1c72 fix mod-lisp bugs
* tekuti/mod-lisp.scm (url, read-request/mod-lisp)a
  (write-headers/mod-lisp, write-response/mod-lisp): Fix a number of
  mod-lisp bugs.
2010-11-23 21:48:43 +01:00
Andy Wingo
c2d3231e24 fix post content-type check
* tekuti/request.scm (request-form-data): Fix content-type check.
2010-11-22 23:50:48 +01:00
Andy Wingo
473bd070ae don't display doctype if unnecessary
* tekuti/page-helpers.scm (respond): Don't display a doctype if we
  aren't given one.
2010-11-22 23:42:10 +01:00
Andy Wingo
dda89fe5bf config refactor so that tekuti knows its public address
* tekuti/config.scm (*public-host*, *public-port*)
  (*private-host*, *private-port*): Use these instead of *host* and the
  recently removed *port*. A web app needs to know its public address,
  and the private ports are part of its config.
  (*server-impl-args*): Redefine as a thunk to delay the dereferencing
  of config parameters like *private-host*.

* tekuti/page-helpers.scm (ensure-public-uri): New helper, uses the new
  conf vars to ensure that a value is a URI.
  (build-headers): New helper, like the old acons* without consing a
  rest list.
  (respond): Use the two new helpers.
  (atom-header, atom-entry): No need for server-name arg, as we know how
  to make a public URI.

* tekuti/page.scm (page-feed-atom): Adapt to no need to guess at the
  server-name.

* tekuti/web.scm (main-loop): Allow *server-impl-args* to be a thunk.
2010-11-22 23:33:08 +01:00
Andy Wingo
3ece90674a expanduser tweaks
* tekuti/util.scm (expanduser): Use passwd:name accessor, and geteuid as
  cuserid did.
2010-11-18 11:16:50 +01:00
Ramakrishnan Muthukrishnan
1692732222 get username from the password file instead of using `cuserid'.
* tekuti/util.scm (expanduser): Use the user id to fetch the
  username from the /etc/passwd file, so that the username is
  not chopped at eight characters.
2010-11-18 11:15:48 +01:00
Ramakrishnan Muthukrishnan
b8b1f47d65 Change wordpress import to use the newer wordpress database layout.
* wordpress_to_dir.py (all_posts): select only published posts.
  (post_categories): get the post category based on the new set
  of tables wp_terms, wp_term_relationships and wp_term_taxonomy.
2010-11-15 22:05:15 +01:00
Andy Wingo
befda5cb02 big change to use new (web server) infrastructure
Change to use (web server) instead of our own loop. This also means that
requests are request objects from (web request), and responses are from
(web response).

* tekuti/boot.scm (boot): Run the main loop from (tekuti web).

* tekuti/config.scm (*port*, *backlog*, *public-url-base*)
  (*private-url-base*): Remove extraneous config vars.

* tekuti/mod-lisp.scm: Rewrite to be a (web server) server-impl. Not
  tested very well.

* tekuti/page-helpers.scm (respond): New procedure, now the primary way
  to respond to a request.
  (relurl, rellink): Take path components as a list, and encode the
  parts when making the resulting URL. All callers changed.

* tekuti/page.scm: Change all handlers to take an additional `body'
  argument, to respond using `respond', and to use the new `relurl' /
  `rellink' protocol.

* tekuti/request.scm: Eviscerate, leaving only pieces that deal in
  request objects from `(web request)'.

* tekuti/web.scm: Update to use (weeb server).
2010-11-13 19:26:47 +01:00
Andy Wingo
1152ccf68a (tekuti tags) uses (web uri)
* tekuti/tags.scm (tag-link): Use (web uri).
2010-11-13 19:09:35 +01:00
Andy Wingo
0d4fc4e501 templatize uses (web uri)
* tekuti/template.scm (templatize): Use define* and keyword args instead
  of taking a "request" object. Use (web uri) for URI work.
2010-11-13 19:08:59 +01:00
Andy Wingo
820b449cbc updates to (tekuti config)
* tekuti/config.scm (*private-url-base*, *public-url-base*): Change to
  "/", so that we can serve HTTP directly without having a fetch to
  e.g. "/foo.css" cause an error. A silly reason, I know.
  (*public-path-base*, *private-path-base*): New vars, containing lists
  of path components corresponding to their "url" variants above. We are
  switching to this, as future commits will show.
  (*server-impl*, *server-impl-args*): New vars, will be used by the new
  (web server) main loop.
2010-11-13 19:02:47 +01:00
Andy Wingo
5d85d1b7fe remove with-backtrace definition; add date->timestamp
* tekuti/util.scm: Remove with-backtrace definition. Add date->timestamp
  definition.
2010-11-13 18:58:36 +01:00
Andy Wingo
a8c28da20b remove a couple uses of with-backtrace
* tekuti/index.scm (reindex): Don't use with-backtrace, that's not how I
  want to roll, debugging-wise.

* tekuti/post.scm (post-sxml-content): Same
2010-11-13 18:55:25 +01:00
Andy Wingo
31a2d6ebbc fix various (tekuti git) errors
* tekuti/git.scm (git-update-ref, patch-blob, munge-tree1-recursive):
  Fix various errors caught by the compiler.
2010-11-13 18:48:18 +01:00
Andy Wingo
f34e3b1c78 src/tekuti uses -s, not -l
* src/tekuti: Change to use an implicit `-s', so a control-c causes an
  exit rather than dropping us into a repl.
2010-11-13 18:48:18 +01:00