user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/6] inbox: drop psgi.url_scheme requirement from base_url
  2019-01-31 10:51  5% [PATCH 0/6] more minor cleanups and doc updates Eric Wong
@ 2019-01-31 10:51  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-01-31 10:51 UTC (permalink / raw)
  To: meta

This will make it easier to make command-line tools
from SolverGit.
---
 lib/PublicInbox/Inbox.pm | 4 ++--
 t/solver_git.t           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 6fe896f..cde4625 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -202,8 +202,8 @@ sub cloneurl {
 
 sub base_url {
 	my ($self, $env) = @_;
-	if ($env) { # PSGI env
-		my $scheme = $env->{'psgi.url_scheme'};
+	my $scheme;
+	if ($env && ($scheme = $env->{'psgi.url_scheme'})) { # PSGI env
 		my $host_port = $env->{HTTP_HOST} ||
 			"$env->{SERVER_NAME}:$env->{SERVER_PORT}";
 		my $url = "$scheme://$host_port". ($env->{SCRIPT_NAME} || '/');
diff --git a/t/solver_git.t b/t/solver_git.t
index 66e6317..8de6398 100644
--- a/t/solver_git.t
+++ b/t/solver_git.t
@@ -44,7 +44,7 @@ $ibx->{-repo_objs} = [ PublicInbox::Git->new($git_dir) ];
 my $res;
 my $solver = PublicInbox::SolverGit->new($ibx, sub { $res = $_[0] });
 open my $log, '+>>', "$mainrepo/solve.log" or die "open: $!";
-my $psgi_env = { 'psgi.url_scheme' => 'http', HTTP_HOST => 'example.com' };
+my $psgi_env = { 'psgi.errors' => *STDERR };
 $solver->solve($psgi_env, $log, '69df7d5', {});
 ok($res, 'solved a blob!');
 my $wt_git = $res->[0];
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/6] more minor cleanups and doc updates
@ 2019-01-31 10:51  5% Eric Wong
  2019-01-31 10:51  7% ` [PATCH 1/6] inbox: drop psgi.url_scheme requirement from base_url Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-01-31 10:51 UTC (permalink / raw)
  To: meta

Always more work to do :x

Eric Wong (6):
  inbox: drop psgi.url_scheme requirement from base_url
  qspawn: documentation updates
  config: tiny cleanup to use _array() sub
  doc/config: user documentation for limiters
  doc/config: document "replyto" configuration knob
  doc: remove completed TODO items

 Documentation/public-inbox-config.pod | 78 +++++++++++++++++++++++++++
 TODO                                  |  5 --
 lib/PublicInbox/Config.pm             |  2 +-
 lib/PublicInbox/Inbox.pm              |  4 +-
 lib/PublicInbox/Qspawn.pm             | 77 ++++++++++++++++++++++----
 lib/PublicInbox/ViewVCS.pm            |  3 +-
 t/solver_git.t                        |  2 +-
 7 files changed, 150 insertions(+), 21 deletions(-)

-- 
EW


^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-01-31 10:51  5% [PATCH 0/6] more minor cleanups and doc updates Eric Wong
2019-01-31 10:51  7% ` [PATCH 1/6] inbox: drop psgi.url_scheme requirement from base_url Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).