code: func (handler *UnroutedHandler) HeadFile(w http.ResponseWriter, r *http.Request) {
  
  	id, err := extractIDFromPath(r.URL.Path)
  	if err != nil {
  		handler.sendError(w, r, err)
  		return
  	}
  
  	if handler.composer.UsesLocker {
  		locker := handler.composer.Locker
  		if err := locker.LockUpload(id); err != nil {
  			handler.sendError(w, r, err)
  			return
  		}
  
  		defer locker.UnlockUpload(id)
  	}
  
  	info, err := handler.composer.Core.GetInfo(id)
  	if err != nil {
  		handler.sendError(w, r, err)
  		return
  	}
  
  	// Add Upload-Concat header if possible
  	if info.IsPartial {
  		w.Header().Set("Upload-Concat", "partial")
  	}
  
  	if info.IsFinal {
  		v := "final;"
  		for _, uploadID := range info.PartialUploads {
  			v += handler.absFileURL(r, uploadID) + " "
  		}
  		// Remove trailing space
  		v = v[:len(v)-1]
  
  		w.Header().Set("Upload-Concat", v)
  	}
  
  	if len(info.MetaData) != 0 {
  		w.Header().Set("Upload-Metadata", SerializeMetadataHeader(info.MetaData))
  	}
  
  	if info.SizeIsDeferred {
  		w.Header().Set("Upload-Defer-Length", UploadLengthDeferred)
  	} else {
  		w.Header().Set("Upload-Length", strconv.FormatInt(info.Size, 10))
  	}
  
  	w.Header().Set("Cache-Control", "no-store")
  	w.Header().Set("Upload-Offset", strconv.FormatInt(info.Offset, 10))
  	handler.sendResp(w, r, http.StatusOK)
  }
docs: // HeadFile returns the length and offset for the HEAD request