commit 122b5e7c8ecff9aa5e5256c1d630b68c11a6dc1f
parent 111a195a675fb1295f8a83f17c6ef14c7965d981
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Tue, 27 Oct 2026 12:41:51 +0100
debug
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/taldir/taldir.go b/pkg/taldir/taldir.go
@@ -269,6 +269,7 @@ func (t *Taldir) getSingleEntry(w http.ResponseWriter, r *http.Request) {
hsAlias := saltHAlias(vars["h_alias"], t.Salt)
var err = t.DB.GetEntryByHsAlias(&entry, hsAlias)
if err == nil {
+ t.Logger.Logf(LogDebug, "Found entry %v", entry)
entryValidity := time.UnixMicro(entry.CreatedAt + entry.Duration)
w.Header().Set("Content-Type", "application/json")
w.Write(fmt.Appendf(make([]byte, 0), "{\"target_uri\": \"%s\", \"valid_for\": { \"d_us\": %d }}", entry.TargetURI, time.Until(entryValidity).Microseconds()))
@@ -452,7 +453,6 @@ func (t *Taldir) validationRequest(w http.ResponseWriter, r *http.Request) {
entryValidFor = time.Until(time.UnixMicro(entry.CreatedAt + entry.Duration)).Microseconds()
}
w.Write(fmt.Appendf(make([]byte, 0), "{\"valid_for\": { \"d_us\": %d }}", entryValidFor))
- w.WriteHeader(http.StatusOK)
}
func (t *Taldir) isRateLimited(hAlias string) (bool, error) {